Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
relay_teamcheck.qc
Go to the documentation of this file.
1#include "relay_teamcheck.qh"
2
3#ifdef SVQC
5{
6 if(this.active != ACTIVE_ACTIVE)
7 return;
8
9 if(actor.team)
10 {
12 {
13 if(DIFF_TEAM(actor, this))
14 SUB_UseTargets(this, actor, trigger);
15 }
16 else
17 {
18 if(SAME_TEAM(actor, this))
19 SUB_UseTargets(this, actor, trigger);
20 }
21 }
22 else
23 {
25 SUB_UseTargets(this, actor, trigger);
26 }
27}
28
30{
31 this.active = ACTIVE_ACTIVE;
32 this.team = this.team_saved;
33}
34
35spawnfunc(trigger_relay_teamcheck)
36{
37 this.active = ACTIVE_ACTIVE;
38 this.team_saved = this.team;
39 IL_PUSH(g_saved_team, this);
42}
43#endif
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
int team
Definition main.qh:188
int spawnflags
Definition ammo.qh:15
#define use
int active
Definition defs.qh:34
const int ACTIVE_ACTIVE
Definition defs.qh:37
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition triggers.qc:344
void trigger_relay_teamcheck_reset(entity this)
void trigger_relay_teamcheck_use(entity this, entity actor, entity trigger)
const int RELAYTEAMCHECK_NOTEAM
const int RELAYTEAMCHECK_INVERT
IntrusiveList g_saved_team
Definition vote.qh:79
int team_saved
Definition vote.qh:70
#define spawnfunc(id)
Definition spawnfunc.qh:96
#define SAME_TEAM(a, b)
Definition teams.qh:241
#define DIFF_TEAM(a, b)
Definition teams.qh:242