]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/trigger/swamp.qc
Merge branch 'terencehill/menu_registries' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / swamp.qc
index 3aa6134a9a3cef9cd8cf6cd57a0932c262e2729e..061c621313494256c7b4666bbb64d792ff769e3c 100644 (file)
@@ -31,20 +31,12 @@ void swamp_think(entity this)
        {
                FOREACH_ENTITY_RADIUS((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1, it.swampslug.active == ACTIVE_NOT && IS_PLAYER(it) && !IS_DEAD(it),
                {
-                       vector emin = it.absmin;
-                       vector emax = it.absmax;
-                       if(this.solid == SOLID_BSP)
+                       if (WarpZoneLib_ExactTrigger_Touch(this, it, false))
                        {
-                               emin -= '1 1 1';
-                               emax += '1 1 1';
+                               if(!it.swampslug)
+                                       IL_PUSH(g_swamped, it);
+                               it.swampslug = this;
                        }
-                       if(boxesoverlap(emin, emax, this.absmin, this.absmax)) // quick
-                               if(WarpZoneLib_BoxTouchesBrush(emin, emax, this, it)) // accurate
-                               {
-                                       if(!it.swampslug)
-                                               IL_PUSH(g_swamped, it);
-                                       it.swampslug = this;
-                               }
                });
 
                IL_EACH(g_swamped, it.swampslug == this,
@@ -69,7 +61,6 @@ spawnfunc(trigger_swamp)
        // Init stuff
        EXACTTRIGGER_INIT;
        this.active = ACTIVE_ACTIVE;
-       //trigger_init(this);
        setthink(this, swamp_think);
        this.nextthink = time;