Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
kill.qc File Reference
#include "kill.qh"
Include dependency graph for kill.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 spawnfunc (target_kill)
void target_kill_reset (entity this)
void target_kill_use (entity this, entity actor, entity trigger)

Function Documentation

◆ spawnfunc()

spawnfunc ( target_kill )

Definition at line 23 of file kill.qc.

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}
string message
Definition powerups.qc:19
#define use
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
string message2
Definition triggers.qh:19

References active, ACTIVE_ACTIVE, message, message2, target_kill_reset(), target_kill_use(), and use.

◆ target_kill_reset()

void target_kill_reset ( entity this)

Definition at line 18 of file kill.qc.

19{
20 this.active = ACTIVE_ACTIVE;
21}

References active, ACTIVE_ACTIVE, and entity().

Referenced by spawnfunc().

◆ target_kill_use()

void target_kill_use ( entity this,
entity actor,
entity trigger )

Definition at line 4 of file kill.qc.

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}
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
const int DAMAGE_NO
Definition subs.qh:79

References active, ACTIVE_ACTIVE, Damage(), DAMAGE_NO, DMG_NOWEP, and entity().

Referenced by spawnfunc().