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)));
// 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)
// 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;