Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
relay_teamcheck.qc File Reference
#include "relay_teamcheck.qh"
Include dependency graph for relay_teamcheck.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 spawnfunc (trigger_relay_teamcheck)
void trigger_relay_teamcheck_reset (entity this)
void trigger_relay_teamcheck_use (entity this, entity actor, entity trigger)

Function Documentation

◆ spawnfunc()

spawnfunc ( trigger_relay_teamcheck )

Definition at line 35 of file relay_teamcheck.qc.

36{
37 this.active = ACTIVE_ACTIVE;
38 this.team_saved = this.team;
39 IL_PUSH(g_saved_team, this);
42}
int team
Definition main.qh:188
#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 trigger_relay_teamcheck_reset(entity this)
void trigger_relay_teamcheck_use(entity this, entity actor, entity trigger)
IntrusiveList g_saved_team
Definition vote.qh:79
int team_saved
Definition vote.qh:70

References active, ACTIVE_ACTIVE, g_saved_team, IL_PUSH(), team, team_saved, trigger_relay_teamcheck_reset(), trigger_relay_teamcheck_use(), and use.

◆ trigger_relay_teamcheck_reset()

void trigger_relay_teamcheck_reset ( entity this)

Definition at line 29 of file relay_teamcheck.qc.

30{
31 this.active = ACTIVE_ACTIVE;
32 this.team = this.team_saved;
33}

References active, ACTIVE_ACTIVE, entity(), team, and team_saved.

Referenced by spawnfunc().

◆ trigger_relay_teamcheck_use()

void trigger_relay_teamcheck_use ( entity this,
entity actor,
entity trigger )

Definition at line 4 of file relay_teamcheck.qc.

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}
int spawnflags
Definition ammo.qh:15
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition triggers.qc:344
const int RELAYTEAMCHECK_NOTEAM
const int RELAYTEAMCHECK_INVERT
#define SAME_TEAM(a, b)
Definition teams.qh:241
#define DIFF_TEAM(a, b)
Definition teams.qh:242

References active, ACTIVE_ACTIVE, DIFF_TEAM, entity(), RELAYTEAMCHECK_INVERT, RELAYTEAMCHECK_NOTEAM, SAME_TEAM, spawnflags, and SUB_UseTargets().

Referenced by spawnfunc().