]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also fade out warpzones properly (based on VIEW origin, not on MOVE origin)
authorRudolf Polzer <divverent@xonotic.org>
Fri, 27 May 2011 19:30:10 +0000 (21:30 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 27 May 2011 19:30:10 +0000 (21:30 +0200)
qcsrc/warpzonelib/client.qc

index 4b36b4651dc75efa463357b8f7d2405caaffcd05..694c597a010c1f9c710a162ad066cd4fb5db25fe 100644 (file)
@@ -1,7 +1,11 @@
 void WarpZone_Fade_PreDraw()
 {
        if(self.warpzone_fadestart)
-               self.alpha = bound(0, (self.warpzone_fadeend - vlen(view_origin - self.origin - 0.5 * (self.mins + self.maxs))) / (self.warpzone_fadeend - self.warpzone_fadestart), 1);
+       {
+               vector org;
+               org = R_SetView3fv(VF_ORIGIN);
+               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)));