]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/relay_teamcheck.qc
Move an assault constant into the assault file
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / relay_teamcheck.qc
index 2972d32bbf79b3e23fa6da66e4e9569e982a6824..bf03b1542f0f957279c80f8f81ed1dbb891c0eaa 100644 (file)
@@ -1,9 +1,10 @@
+#include "relay_teamcheck.qh"
 #ifdef SVQC
 void trigger_relay_teamcheck_use(entity this, entity actor, entity trigger)
 {
        if(actor.team)
        {
-               if(this.spawnflags & 2)
+               if(this.spawnflags & RELAYTEAMCHECK_INVERT)
                {
                        if(DIFF_TEAM(actor, this))
                                SUB_UseTargets(this, actor, trigger);
@@ -16,7 +17,7 @@ void trigger_relay_teamcheck_use(entity this, entity actor, entity trigger)
        }
        else
        {
-               if(this.spawnflags & 1)
+               if(this.spawnflags & RELAYTEAMCHECK_NOTEAM)
                        SUB_UseTargets(this, actor, trigger);
        }
 }
@@ -29,6 +30,7 @@ void trigger_relay_teamcheck_reset(entity this)
 spawnfunc(trigger_relay_teamcheck)
 {
        this.team_saved = this.team;
+       IL_PUSH(g_saved_team, this);
        this.use = trigger_relay_teamcheck_use;
        this.reset = trigger_relay_teamcheck_reset;
 }