X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fwarpzonelib%2Fclient.qc;h=5370ba519817dc86eff61c527689268af2f09aec;hp=a44b3797451b73453fcbe482546827c2d071d0e6;hb=387861a0bee1121b0869bfaf8cff5b703ffc1ad2;hpb=26ec33d6d19e627b43ac2cb51f83f890b5176293 diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index a44b37974..5370ba519 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -1,11 +1,16 @@ void WarpZone_Fade_PreDraw() { - if(self.warpzone_fadestart) - { - vector org; - org = getpropertyvec(VF_ORIGIN); + vector org; + org = getpropertyvec(VF_ORIGIN); + if( +#ifdef COMPAT_XON060_DONTCRASH_CHECKPVS + cvar_string("g_xonoticversion") != "0.5.0" && + cvar_string("g_xonoticversion") != "0.6.0" && +#endif + !checkpvs(org, self)) // this makes sense as long as we don't support recursive warpzones + self.alpha = 0; + else if(self.warpzone_fadestart) self.alpha = bound(0, (self.warpzone_fadeend - vlen(org - self.origin - 0.5 * (self.mins + self.maxs))) / (self.warpzone_fadeend - self.warpzone_fadestart), 1); - } else self.alpha = 1; //print(sprintf("%v <-> %v\n", view_origin, self.origin + 0.5 * (self.mins + self.maxs))); @@ -20,7 +25,7 @@ void WarpZone_Read(float isnew) float f; warpzone_warpzones_exist = 1; - if not(self.enemy) + if (!self.enemy) { self.enemy = spawn(); self.enemy.classname = "warpzone_from"; @@ -79,10 +84,7 @@ void WarpZone_Read(float isnew) // how to draw // engine currently wants this - if(self.warpzone_fadestart) - self.predraw = WarpZone_Fade_PreDraw; - else - self.drawmask = MASK_NORMAL; + self.predraw = WarpZone_Fade_PreDraw; } void WarpZone_Camera_Read(float isnew) @@ -139,10 +141,7 @@ void WarpZone_Camera_Read(float isnew) // how to draw // engine currently wants this - if(self.warpzone_fadestart) - self.predraw = WarpZone_Fade_PreDraw; - else - self.drawmask = MASK_NORMAL; + self.predraw = WarpZone_Fade_PreDraw; } void CL_RotateMoves(vector ang) = #638;