]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/platforms.qc
Merge branch 'master' into TimePath/csqc_sounds
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / platforms.qc
index b4f387470c64bea1c3e1e47fd17dbab141293e7d..11f0bd0024a25b407cb320659cea75114d937916 100644 (file)
@@ -5,13 +5,13 @@ void generic_plat_blocked()
        {
                if(self.dmgtime2 < time)
                {
-                       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');
                        self.dmgtime2 = time + self.dmgtime;
                }
 
                // Gib dead/dying stuff
                if(other.deadflag != DEAD_NO)
-                       Damage (other, self, self, 10000, DEATH_HURTTRIGGER, other.origin, '0 0 0');
+                       Damage (other, self, self, 10000, DEATH_HURTTRIGGER.m_id, other.origin, '0 0 0');
        }
 #endif
 }
@@ -65,7 +65,7 @@ void plat_spawn_inside_trigger()
 
 void plat_hit_top()
 {SELFPARAM();
-       sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
+       _sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
        self.state = 1;
 
        self.SUB_THINK = plat_go_down;
@@ -74,20 +74,20 @@ void plat_hit_top()
 
 void plat_hit_bottom()
 {SELFPARAM();
-       sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
+       _sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
        self.state = 2;
 }
 
 void plat_go_down()
 {SELFPARAM();
-       sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTEN_NORM);
+       _sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTEN_NORM);
        self.state = 3;
        SUB_CalcMove (self.pos2, TSPEED_LINEAR, self.speed, plat_hit_bottom);
 }
 
 void plat_go_up()
 {SELFPARAM();
-       sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTEN_NORM);
+       _sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTEN_NORM);
        self.state = 4;
        SUB_CalcMove (self.pos1, TSPEED_LINEAR, self.speed, plat_hit_top);
 }
@@ -150,7 +150,7 @@ void plat_crush()
        if((self.spawnflags & 4) && (other.takedamage != DAMAGE_NO))
        { // KIll Kill Kill!!
 #ifdef SVQC
-               Damage (other, self, self, 10000, DEATH_HURTTRIGGER, other.origin, '0 0 0');
+               Damage (other, self, self, 10000, DEATH_HURTTRIGGER.m_id, other.origin, '0 0 0');
 #endif
        }
        else
@@ -158,10 +158,10 @@ void plat_crush()
 #ifdef SVQC
                if((self.dmg) && (other.takedamage != DAMAGE_NO))
                {   // Shall we bite?
-                       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');
                        // Gib dead/dying stuff
                        if(other.deadflag != DEAD_NO)
-                               Damage (other, self, self, 10000, DEATH_HURTTRIGGER, other.origin, '0 0 0');
+                               Damage (other, self, self, 10000, DEATH_HURTTRIGGER.m_id, other.origin, '0 0 0');
                }
 #endif
 
@@ -185,23 +185,23 @@ void plat_use()
 
 .string sound1, sound2;
 
-void plat_reset()
-{SELFPARAM();
+void plat_reset(entity this)
+{
        IFTARGETED
        {
-               setorigin (self, self.pos1);
-               self.state = 4;
-               self.use = plat_use;
+               setorigin (this, this.pos1);
+               this.state = 4;
+               this.use = plat_use;
        }
        else
        {
-               setorigin (self, self.pos2);
-               self.state = 2;
-               self.use = plat_trigger_use;
+               setorigin (this, this.pos2);
+               this.state = 2;
+               this.use = plat_trigger_use;
        }
 
 #ifdef SVQC
-       self.SendFlags |= SF_TRIGGER_RESET;
+       this.SendFlags |= SF_TRIGGER_RESET;
 #endif
 }