]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/hurt.qc
Merge branch 'terencehill/menu_fixes' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / hurt.qc
index 7a12011931497bb4c141cecb0c7e7f1152aa1c5e..a7ee567ebc08ec3c8a0615720e4cbe1fd35af98f 100644 (file)
@@ -1,10 +1,10 @@
 #ifdef SVQC
-void trigger_hurt_use()
-{SELFPARAM();
-       if(IS_PLAYER(activator))
-               self.enemy = activator;
+void trigger_hurt_use(entity this, entity actor, entity trigger)
+{
+       if(IS_PLAYER(actor))
+               this.enemy = actor;
        else
-               self.enemy = world; // let's just destroy it, if taking over is too much work
+               this.enemy = world; // let's just destroy it, if taking over is too much work
 }
 
 .float triggerhurttime;
@@ -34,7 +34,7 @@ void trigger_hurt_touch()
                                self.enemy = world; // I still hate you all
                        }
 
-                       Damage (other, self, own, self.dmg, DEATH_HURTTRIGGER, other.origin, '0 0 0');
+                       Damage (other, self, own, self.dmg, DEATH_HURTTRIGGER.m_id, other.origin, '0 0 0');
                }
        }
        else if(other.damagedbytriggers)
@@ -42,7 +42,7 @@ void trigger_hurt_touch()
                if(other.takedamage)
                {
                        EXACTTRIGGER_TOUCH;
-                       Damage(other, self, self, self.dmg, DEATH_HURTTRIGGER, other.origin, '0 0 0');
+                       Damage(other, self, self, self.dmg, DEATH_HURTTRIGGER.m_id, other.origin, '0 0 0');
                }
        }
 
@@ -57,8 +57,8 @@ defalt dmg = 5
 .entity trigger_hurt_next;
 entity trigger_hurt_last;
 entity trigger_hurt_first;
-void spawnfunc_trigger_hurt()
-{SELFPARAM();
+spawnfunc(trigger_hurt)
+{
        EXACTTRIGGER_INIT;
        self.active = ACTIVE_ACTIVE;
        self.touch = trigger_hurt_touch;