]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/triggers.qc
Merge branch 'master' into Mario/qc_physics_prehax
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / triggers.qc
index fdffbb9e0018a626470d6bc00a4e5a6c581f9d3a..1e7715a91b58a70ef8472f980ea8a9a094c16214 100644 (file)
@@ -209,6 +209,9 @@ void SUB_UseTargets()
                }
                if (s != "")
                {
+                       // Flag to set func_clientwall state
+                       // 1 == deactivate, 2 == activate, 0 == do nothing
+                       float aw_flag = self.antiwall_flag;
                        for(t = world; (t = find(t, targetname, s)); )
                        if(t.use)
                        {
@@ -218,6 +221,8 @@ void SUB_UseTargets()
                                }
                                else
                                {
+                                       if (t.classname == "func_clientwall" || t.classname == "func_clientillusionary")
+                                               t.antiwall_flag = aw_flag;
                                        self = t;
                                        other = stemp;
                                        activator = act;
@@ -240,31 +245,6 @@ void SUB_UseTargets()
        other = otemp;
 }
 
-#ifdef SVQC
-void trigger_think_generic()
-{
-       self.nextthink = time;
-
-       entity e;
-       if(self.trigger_touch)
-       for(e = findradius((self.absmin + self.absmax) * 0.5, vlen(self.absmax - self.absmin) * 0.5 + 1); e; e = e.chain)
-       {
-               vector emin = e.absmin, emax = e.absmax;
-               if(self.solid == SOLID_BSP)
-               {
-                       emin -= '1 1 1';
-                       emax += '1 1 1';
-               }
-               if(boxesoverlap(emin, emax, self.absmin, self.absmax)) // quick
-               if(WarpZoneLib_BoxTouchesBrush(emin, emax, self, e)) // accurate
-               {
-                       other = e;
-                       self.trigger_touch();
-               }
-       }
-}
-#endif
-
 #ifdef CSQC
 void trigger_touch_generic(void() touchfunc)
 {