]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/fireball.qc
Merge branch 'Mario/hagar_notfixed' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / fireball.qc
index 7d87a5a8616da782071826b9a1a4d13b52642fb0..a6db7c9b71ce578845d5058793ed29a1444a340b 100644 (file)
@@ -179,7 +179,7 @@ void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float dam
        if(this.health <= 0)
        {
                this.cnt = 1;
-               WITH(entity, self, this, W_PrepareExplosionByDamage(attacker, W_Fireball_Explode));
+               WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_Fireball_Explode));
        }
 }
 
@@ -353,11 +353,12 @@ void W_Fireball_Attack2()
 
 METHOD(Fireball, wr_aim, void(entity thiswep))
 {
+    SELFPARAM();
     PHYS_INPUT_BUTTON_ATCK(self) = false;
     PHYS_INPUT_BUTTON_ATCK2(self) = false;
     if(self.bot_primary_fireballmooth == 0)
     {
-        if(bot_aim(WEP_CVAR_PRI(fireball, speed), 0, WEP_CVAR_PRI(fireball, lifetime), false))
+        if(bot_aim(self, WEP_CVAR_PRI(fireball, speed), 0, WEP_CVAR_PRI(fireball, lifetime), false))
         {
             PHYS_INPUT_BUTTON_ATCK(self) = true;
             if(random() < 0.02) self.bot_primary_fireballmooth = 0;
@@ -365,7 +366,7 @@ METHOD(Fireball, wr_aim, void(entity thiswep))
     }
     else
     {
-        if(bot_aim(WEP_CVAR_SEC(fireball, speed), WEP_CVAR_SEC(fireball, speed_up), WEP_CVAR_SEC(fireball, lifetime), true))
+        if(bot_aim(self, WEP_CVAR_SEC(fireball, speed), WEP_CVAR_SEC(fireball, speed_up), WEP_CVAR_SEC(fireball, lifetime), true))
         {
             PHYS_INPUT_BUTTON_ATCK2(self) = true;
             if(random() < 0.01) self.bot_primary_fireballmooth = 1;
@@ -394,6 +395,7 @@ METHOD(Fireball, wr_think, void(entity thiswep, entity actor, .entity weaponenti
 }
 METHOD(Fireball, wr_setup, void(entity thiswep))
 {
+    SELFPARAM();
     self.ammo_field = ammo_none;
 }
 METHOD(Fireball, wr_checkammo1, bool(entity thiswep))
@@ -406,6 +408,7 @@ METHOD(Fireball, wr_checkammo2, bool(entity thiswep))
 }
 METHOD(Fireball, wr_resetplayer, void(entity thiswep))
 {
+    SELFPARAM();
     self.fireball_primarytime = time;
 }
 METHOD(Fireball, wr_suicidemessage, Notification(entity thiswep))
@@ -428,6 +431,7 @@ METHOD(Fireball, wr_killmessage, Notification(entity thiswep))
 
 METHOD(Fireball, wr_impacteffect, void(entity thiswep))
 {
+    SELFPARAM();
     vector org2;
     if(w_deathtype & HITTYPE_SECONDARY)
     {