X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Ftarget%2Fkill.qc;h=b10400c7e1e7de5c3b6f161226d74d914e42d795;hb=1f9e39eec51fa43438b4a0c7cf9412125ee25fbf;hp=2751c600eaf2706694db02198a3b3e6a3b43d427;hpb=bc3f297ed082b23fb33dd0d8f5dcd33bb0198507;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapobjects/target/kill.qc b/qcsrc/common/mapobjects/target/kill.qc index 2751c600e..b10400c7e 100644 --- a/qcsrc/common/mapobjects/target/kill.qc +++ b/qcsrc/common/mapobjects/target/kill.qc @@ -1,9 +1,11 @@ #include "kill.qh" -#include "location.qh" -#ifdef SVQC +#ifdef SVQC void target_kill_use(entity this, entity actor, entity trigger) { + if(this.active != ACTIVE_ACTIVE) + return; + if(actor.takedamage == DAMAGE_NO) return; @@ -13,14 +15,21 @@ void target_kill_use(entity this, entity actor, entity trigger) Damage(actor, this, trigger, 1000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, actor.origin, '0 0 0'); } -spawnfunc(target_kill) +void target_kill_reset(entity this) { - this.classname = "target_kill"; + this.active = ACTIVE_ACTIVE; +} +spawnfunc(target_kill) +{ if (this.message == "") this.message = "was in the wrong place"; + if (this.message2 == "") + this.message2 = "was thrown into a world of hurt by"; + this.use = target_kill_use; + this.reset = target_kill_reset; + this.active = ACTIVE_ACTIVE; } - #endif