From: Rudolf Polzer Date: Tue, 24 Mar 2015 18:52:05 +0000 (+0100) Subject: Allow maps to specify "warpzone_isboxy" "1" to disable exacttrigger logic on anything. X-Git-Tag: xonotic-v0.8.1~98 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f746573dff0cedc83aa8254751fe0e6d829efc93;p=xonotic%2Fxonotic-data.pk3dir.git Allow maps to specify "warpzone_isboxy" "1" to disable exacttrigger logic on anything. This allows for some performance optimizations. --- diff --git a/qcsrc/warpzonelib/util_server.qc b/qcsrc/warpzonelib/util_server.qc index 79cff0174..b94eafbda 100644 --- a/qcsrc/warpzonelib/util_server.qc +++ b/qcsrc/warpzonelib/util_server.qc @@ -77,8 +77,12 @@ void WarpZoneLib_ExactTrigger_Init() makevectors (self.angles); self.movedir = v_forward; } - self.warpzone_isboxy = 1; - if(self.model != "") + if(self.model == "") + { + // It's a box! No need to match with exacttriggers. + self.warpzone_isboxy = 1; + } + else { mi = self.mins; ma = self.maxs; @@ -87,11 +91,11 @@ void WarpZoneLib_ExactTrigger_Init() // let mapper-set mins/maxs override the model's bounds if set if(mi != '0 0 0' || ma != '0 0 0') { + // It's a box! No need to match with exacttriggers. self.mins = mi; self.maxs = ma; + self.warpzone_isboxy = 1; } - else - self.warpzone_isboxy = 0; // enable exacttrigger matching } setorigin(self, self.origin); if(self.scale)