Xonotic
relay_if.qc
Go to the documentation of this file.
1
#include "
relay_if.qh
"
2
3
#ifdef SVQC
4
void
trigger_relay_if_use(
entity
this
,
entity
actor,
entity
trigger)
5
{
6
if
(this.
active
!=
ACTIVE_ACTIVE
)
7
return
;
8
9
int
n = this.
count
;
10
11
// TODO make this generic AND faster than nextent()ing through all, if somehow possible
12
n = (
cvar_string
(this.
netname
) ==
cvar_string
(this.
message
));
13
if
(this.
spawnflags
&
RELAYIF_NEGATE
)
14
n = !n;
15
16
if
(n)
17
SUB_UseTargets
(
this
, actor, trigger);
18
}
19
20
spawnfunc
(trigger_relay_if)
21
{
22
this.reset = spawnfunc_trigger_relay_if;
// this spawnfunc resets fully
23
this.
active
=
ACTIVE_ACTIVE
;
24
this.
use
= trigger_relay_if_use;
25
}
26
#endif
RELAYIF_NEGATE
const int RELAYIF_NEGATE
Definition:
relay_if.qh:4
entity
entity() spawn
SUB_UseTargets
void SUB_UseTargets(entity this, entity actor, entity trigger)
Definition:
triggers.qc:366
netname
string netname
Definition:
powerups.qc:20
spawnfunc
spawnfunc(info_player_attacker)
Definition:
sv_assault.qc:283
spawnflags
float spawnflags
Definition:
progsdefs.qc:191
ACTIVE_ACTIVE
const int ACTIVE_ACTIVE
Definition:
defs.qh:37
message
string message
Definition:
powerups.qc:19
count
float count
Definition:
powerups.qc:22
relay_if.qh
active
int active
Definition:
defs.qh:34
use
#define use
Definition:
csprogsdefs.qh:50
cvar_string
const string cvar_string(string name)
common
mapobjects
trigger
relay_if.qc
Generated on Thu Mar 17 2022 17:26:28 for Xonotic by
1.8.13