X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fwarpzonelib%2Fclient.qc;h=84bfe7b96d9c7ab7e8da6041d4ba3ec74bb6bcd1;hp=a44b3797451b73453fcbe482546827c2d071d0e6;hb=caaa6d2081b569d065b45f5b0bf336b5aa6a39bb;hpb=ae62eb7b0a48758de854556a9f1a1d580df36cfc diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index a44b379745..84bfe7b96d 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -1,11 +1,11 @@ void WarpZone_Fade_PreDraw() { - if(self.warpzone_fadestart) - { - vector org; - org = getpropertyvec(VF_ORIGIN); + vector org; + org = getpropertyvec(VF_ORIGIN); + if(!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))); @@ -79,10 +79,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 +136,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;