]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/mage.qc
Don't shake the hud when changing spectated player
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / mage.qc
index de7bccb4b2824927a26a216acf56d2508989f401..247c6b8f4efbaf22d447e7f608a72ec5adc90b62 100644 (file)
@@ -160,19 +160,18 @@ void M_Mage_Attack_Spike_Explode(entity this)
        remove (this);
 }
 
-void M_Mage_Attack_Spike_Touch()
+void M_Mage_Attack_Spike_Touch(entity this)
 {
-    SELFPARAM();
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
-       M_Mage_Attack_Spike_Explode(self);
+       M_Mage_Attack_Spike_Explode(this);
 }
 
 .float wait;
 
 // copied from W_Seeker_Think
-void M_Mage_Attack_Spike_Think()
-{SELFPARAM();
+void M_Mage_Attack_Spike_Think(entity this)
+{
        if (time > this.ltime || (this.enemy && this.enemy.health <= 0) || this.owner.health <= 0) {
                this.projectiledeathtype |= HITTYPE_SPLASH;
                M_Mage_Attack_Spike_Explode(this);
@@ -230,7 +229,7 @@ void M_Mage_Attack_Spike(entity this, vector dir)
 
        entity missile = spawn();
        missile.owner = missile.realowner = this;
-       missile.think = M_Mage_Attack_Spike_Think;
+       setthink(missile, M_Mage_Attack_Spike_Think);
        missile.ltime = time + 7;
        missile.nextthink = time;
        missile.solid = SOLID_BBOX;
@@ -241,7 +240,7 @@ void M_Mage_Attack_Spike(entity this, vector dir)
        missile.velocity = dir * 400;
        missile.avelocity = '300 300 300';
        missile.enemy = this.enemy;
-       missile.touch = M_Mage_Attack_Spike_Touch;
+       settouch(missile, M_Mage_Attack_Spike_Touch);
 
        this.mage_spike = missile;
 
@@ -446,10 +445,10 @@ METHOD(Mage, mr_think, bool(Mage thismon, entity actor))
     return true;
 }
 
-METHOD(Mage, mr_pain, bool(Mage this, entity actor))
+METHOD(Mage, mr_pain, float(Mage this, entity actor, float damage_take, entity attacker, float deathtype))
 {
     TC(Mage, this);
-    return true;
+    return damage_take;
 }
 
 METHOD(Mage, mr_death, bool(Mage this, entity actor))