Xonotic
kill.qc
Go to the documentation of this file.
1
#include "
kill.qh
"
2
3
#ifdef SVQC
4
void
target_kill_use(
entity
this
,
entity
actor,
entity
trigger)
5
{
6
if
(this.
active
!=
ACTIVE_ACTIVE
)
7
return
;
8
9
if
(actor.takedamage ==
DAMAGE_NO
)
10
return
;
11
12
if
(!actor.iscreature && !actor.damagedbytriggers)
13
return
;
14
15
Damage
(actor,
this
, trigger, 1000, DEATH_HURTTRIGGER.m_id,
DMG_NOWEP
, actor.origin,
'0 0 0'
);
16
}
17
18
void
target_kill_reset(
entity
this
)
19
{
20
this.
active
=
ACTIVE_ACTIVE
;
21
}
22
23
spawnfunc
(target_kill)
24
{
25
if
(this.
message
==
""
)
26
this.
message
=
"was in the wrong place"
;
27
28
if
(this.message2 ==
""
)
29
this.message2 =
"was thrown into a world of hurt by"
;
30
31
this.
use
= target_kill_use;
32
this.reset = target_kill_reset;
33
this.
active
=
ACTIVE_ACTIVE
;
34
}
35
#endif
entity
entity() spawn
spawnfunc
spawnfunc(info_player_attacker)
Definition:
sv_assault.qc:283
DMG_NOWEP
#define DMG_NOWEP
Definition:
damage.qh:126
ACTIVE_ACTIVE
const int ACTIVE_ACTIVE
Definition:
defs.qh:37
message
string message
Definition:
powerups.qc:19
kill.qh
Damage
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition:
damage.qc:583
active
int active
Definition:
defs.qh:34
use
#define use
Definition:
csprogsdefs.qh:50
DAMAGE_NO
float DAMAGE_NO
Definition:
progsdefs.qc:282
common
mapobjects
target
kill.qc
Generated on Thu Mar 17 2022 17:26:27 for Xonotic by
1.8.13