]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow maps to specify "warpzone_isboxy" "1" to disable exacttrigger logic on anything.
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 24 Mar 2015 18:52:05 +0000 (19:52 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 24 Mar 2015 18:52:05 +0000 (19:52 +0100)
This allows for some performance optimizations.

qcsrc/warpzonelib/util_server.qc

index 79cff0174a3a98f3c046a68777de6c07e3bb7eee..b94eafbdafd4e422af7dd6eb5c31933156dbb988 100644 (file)
@@ -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)