Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
relay_activators.qc
Go to the documentation of this file.
1
#include "
relay_activators.qh
"
2
3
#ifdef SVQC
4
void
relay_activators_use
(
entity
this
,
entity
actor,
entity
trigger)
5
{
6
if
(this.
active
!=
ACTIVE_ACTIVE
)
7
return
;
8
9
for
(
entity
trg =
NULL
; (trg =
find
(trg,
targetname
, this.
target
)); )
10
{
11
if
(trg.setactive)
12
trg.setactive(trg, this.
cnt
);
13
else
14
{
15
//bprint("Not using setactive\n");
16
generic_setactive
(trg, this.
cnt
);
17
}
18
}
19
}
20
21
void
relay_activators_init
(
entity
this
)
22
{
23
this.reset =
relay_activators_init
;
// doubles as a reset function
24
this.
active
=
ACTIVE_ACTIVE
;
25
this.
use
=
relay_activators_use
;
26
}
27
28
spawnfunc
(relay_activate)
29
{
30
this.
cnt
=
ACTIVE_ACTIVE
;
31
relay_activators_init
(
this
);
32
}
33
34
spawnfunc
(relay_deactivate)
35
{
36
this.
cnt
=
ACTIVE_NOT
;
37
relay_activators_init
(
this
);
38
}
39
40
spawnfunc
(relay_activatetoggle)
41
{
42
this.
cnt
=
ACTIVE_TOGGLE
;
43
relay_activators_init
(
this
);
44
}
45
#endif
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
cnt
float cnt
Definition
powerups.qc:24
use
#define use
Definition
csprogsdefs.qh:50
ACTIVE_TOGGLE
const int ACTIVE_TOGGLE
Definition
defs.qh:40
ACTIVE_NOT
const int ACTIVE_NOT
Definition
defs.qh:36
active
int active
Definition
defs.qh:34
ACTIVE_ACTIVE
const int ACTIVE_ACTIVE
Definition
defs.qh:37
find
entity find(entity start,.string field, string match)
NULL
#define NULL
Definition
post.qh:14
relay_activators_use
void relay_activators_use(entity this, entity actor, entity trigger)
Definition
relay_activators.qc:4
relay_activators_init
void relay_activators_init(entity this)
Definition
relay_activators.qc:21
relay_activators.qh
spawnfunc
#define spawnfunc(id)
Definition
spawnfunc.qh:96
generic_setactive
void generic_setactive(entity this, int act)
Definition
triggers.qc:46
targetname
string targetname
Definition
triggers.qh:56
target
string target
Definition
triggers.qh:55
common
mapobjects
trigger
relay_activators.qc
Generated on
for Xonotic QuakeC by
1.14.0