Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
kill.qc
Go to the documentation of this file.
1#include "kill.qh"
2
3#ifdef SVQC
4void 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
19{
20 this.active = ACTIVE_ACTIVE;
21}
22
23spawnfunc(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
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
string message
Definition powerups.qc:19
#define use
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition damage.qc:503
#define DMG_NOWEP
Definition damage.qh:104
int active
Definition defs.qh:34
const int ACTIVE_ACTIVE
Definition defs.qh:37
void target_kill_use(entity this, entity actor, entity trigger)
Definition kill.qc:4
void target_kill_reset(entity this)
Definition kill.qc:18
#define spawnfunc(id)
Definition spawnfunc.qh:96
const int DAMAGE_NO
Definition subs.qh:79
string message2
Definition triggers.qh:19