]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_triggers.qc
Merge branch 'Penguinum/Antiwall' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_triggers.qc
index 51ee3451e354d6c5cd6188767eb25aceb3a37109..cdca7e245a6066f33d4d928ecf79c612a97070c0 100644 (file)
@@ -1,5 +1,5 @@
 #include "g_triggers.qh"
-#include "_.qh"
+#include "_all.qh"
 
 #include "weapons/csqcprojectile.qh"
 #include "../common/deathtypes.qh"
@@ -109,6 +109,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)
                        {
@@ -118,6 +121,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;