Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
targettrigger.qc
Go to the documentation of this file.
1
#include "
targettrigger.qh
"
2
3
#ifdef SVQC
4
5
spawnfunc
(turret_targettrigger);
6
void
turret_targettrigger_touch
(
entity
this
,
entity
toucher
);
7
8
void
turret_targettrigger_touch
(
entity
this
,
entity
toucher
)
9
{
10
if
(this.
cnt
>
time
)
return
;
11
IL_EACH
(
g_turrets
, it.targetname ==
this
.target,
12
{
13
if (!(it.turret_flags & TUR_FLAG_RECIEVETARGETS)) continue;
14
if (!it.turret_addtarget) continue;
15
it.turret_addtarget(it, toucher, this);
16
});
17
this.
cnt
=
time
+ 0.5;
18
}
19
20
/*QUAKED turret_targettrigger (.5 .5 .5) ?
21
*/
22
spawnfunc
(turret_targettrigger)
23
{
24
if
(!
autocvar_g_turrets
) {
delete
(
this
);
return
; }
25
26
InitTrigger
(
this
);
27
28
settouch
(
this
,
turret_targettrigger_touch
);
29
}
30
31
#endif
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
cnt
float cnt
Definition
powerups.qc:24
time
float time
Definition
csprogsdefs.qc:16
IL_EACH
#define IL_EACH(this, cond, body)
Definition
intrusivelist.qh:186
toucher
entity entity toucher
Definition
self.qh:72
settouch
#define settouch(e, f)
Definition
self.qh:73
spawnfunc
#define spawnfunc(id)
Definition
spawnfunc.qh:96
InitTrigger
void InitTrigger(entity this)
Definition
subs.qc:553
autocvar_g_turrets
bool autocvar_g_turrets
Definition
sv_turrets.qh:5
g_turrets
IntrusiveList g_turrets
Definition
sv_turrets.qh:113
turret_targettrigger_touch
void turret_targettrigger_touch(entity this, entity toucher)
Definition
targettrigger.qc:8
targettrigger.qh
common
turrets
targettrigger.qc
Generated on
for Xonotic QuakeC by
1.14.0