From 515d093b6e2b4d7d6fea50344307d2d0262761c3 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 27 May 2011 21:30:10 +0200 Subject: [PATCH] also fade out warpzones properly (based on VIEW origin, not on MOVE origin) --- qcsrc/warpzonelib/client.qc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index 4b36b4651..694c597a0 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -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))); -- 2.39.2