From 59ccd2954612f71b9d883896c9bcbb5b49bbb2a2 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 18 Mar 2012 22:22:57 +0100 Subject: [PATCH] don't crash Xonotic 0.6.0 release by using checkpvs on client (it's broken) --- qcsrc/common/util-pre.qh | 2 ++ qcsrc/warpzonelib/client.qc | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index 518a5698d..b65193d44 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -6,4 +6,6 @@ //# define COMPAT_XON010_CHANNELS # define COMPAT_XON050_ENGINE # define COMPAT_NO_MOD_IS_XONOTIC +# define COMPAT_XON060_DONTCRASH_CHECKPVS #endif + diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index 84bfe7b96..6f7561234 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -2,7 +2,12 @@ void WarpZone_Fade_PreDraw() { vector org; org = getpropertyvec(VF_ORIGIN); - if(!checkpvs(org, self)) // this makes sense as long as we don't support recursive warpzones + 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); -- 2.39.2