]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mapobjects/target/kill.qc
b10400c7e1e7de5c3b6f161226d74d914e42d795
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / target / kill.qc
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