From f746573dff0cedc83aa8254751fe0e6d829efc93 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 24 Mar 2015 19:52:05 +0100 Subject: [PATCH] Allow maps to specify "warpzone_isboxy" "1" to disable exacttrigger logic on anything. This allows for some performance optimizations. --- qcsrc/warpzonelib/util_server.qc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qcsrc/warpzonelib/util_server.qc b/qcsrc/warpzonelib/util_server.qc index 79cff0174a..b94eafbdaf 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) -- 2.39.2