]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/trigger/relay_teamcheck.qc
Remove remove()
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / relay_teamcheck.qc
1 #ifdef SVQC
2 void trigger_relay_teamcheck_use(entity this, entity actor, entity trigger)
3 {
4         if(actor.team)
5         {
6                 if(this.spawnflags & 2)
7                 {
8                         if(DIFF_TEAM(actor, this))
9                                 SUB_UseTargets(this, actor, trigger);
10                 }
11                 else
12                 {
13                         if(SAME_TEAM(actor, this))
14                                 SUB_UseTargets(this, actor, trigger);
15                 }
16         }
17         else
18         {
19                 if(this.spawnflags & 1)
20                         SUB_UseTargets(this, actor, trigger);
21         }
22 }
23
24 void trigger_relay_teamcheck_reset(entity this)
25 {
26         this.team = this.team_saved;
27 }
28
29 spawnfunc(trigger_relay_teamcheck)
30 {
31         this.team_saved = this.team;
32         this.use = trigger_relay_teamcheck_use;
33         this.reset = trigger_relay_teamcheck_reset;
34 }
35 #endif