]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/heal.qc
Merge branch 'master' into terencehill/hud_fixes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / heal.qc
index 6d68610b5cf8ddb5afb7c2101a0b3ffacdb83f5b..cbabe8dfd609096cea7a6bb7d6f79227c1cb112e 100644 (file)
@@ -1,7 +1,7 @@
 #ifdef SVQC
 .float triggerhealtime;
 void trigger_heal_touch()
-{
+{SELFPARAM();
        if (self.active != ACTIVE_ACTIVE)
                return;
 
@@ -9,7 +9,7 @@ void trigger_heal_touch()
        if (other.iscreature)
        {
                if (other.takedamage)
-               if (!other.deadflag)
+               if (!IS_DEAD(other))
                if (other.triggerhealtime < time)
                {
                        EXACTTRIGGER_TOUCH;
@@ -19,13 +19,13 @@ void trigger_heal_touch()
                        {
                                other.health = min(other.health + self.health, self.max_health);
                                other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot);
-                               sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
+                               _sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
                        }
                }
        }
 }
 
-void spawnfunc_trigger_heal()
+spawnfunc(trigger_heal)
 {
        self.active = ACTIVE_ACTIVE;