]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/fireball.qc
Weapons: add a second .weaponentity
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / fireball.qc
index 7a7ff9dee39a27e853bdd4a79dd1d81ac1df5b7d..477aef833faf32fbcf6faba361d98a6b828c4bed 100644 (file)
@@ -229,32 +229,32 @@ void W_Fireball_AttackEffect(float i, vector f_diff)
 void W_Fireball_Attack1_Frame4(Weapon thiswep, entity actor, int slot, int fire)
 {
        W_Fireball_Attack1();
-       weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), w_ready);
+       weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), w_ready);
 }
 
 void W_Fireball_Attack1_Frame3(Weapon thiswep, entity actor, int slot, int fire)
 {
        W_Fireball_AttackEffect(0, '+1.25 +3.75 0');
-       weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame4);
+       weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame4);
 }
 
 void W_Fireball_Attack1_Frame2(Weapon thiswep, entity actor, int slot, int fire)
 {
        W_Fireball_AttackEffect(0, '-1.25 +3.75 0');
-       weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame3);
+       weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame3);
 }
 
 void W_Fireball_Attack1_Frame1(Weapon thiswep, entity actor, int slot, int fire)
 {
        W_Fireball_AttackEffect(1, '+1.25 -3.75 0');
-       weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame2);
+       weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame2);
 }
 
 void W_Fireball_Attack1_Frame0(Weapon thiswep, entity actor, int slot, int fire)
 {SELFPARAM();
        W_Fireball_AttackEffect(0, '-1.25 -3.75 0');
        sound(self, CH_WEAPON_SINGLE, SND_FIREBALL_PREFIRE2, VOL_BASE, ATTEN_NORM);
-       weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame1);
+       weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame1);
 }
 
 void W_Fireball_Firemine_Think(void)
@@ -376,7 +376,7 @@ void W_Fireball_Attack2(void)
                        if(fire & 1)
                        {
                                if(time >= actor.fireball_primarytime)
-                               if(weapon_prepareattack(thiswep, actor, false, WEP_CVAR_PRI(fireball, refire)))
+                               if(weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR_PRI(fireball, refire)))
                                {
                                        W_Fireball_Attack1_Frame0(thiswep, actor, slot, fire);
                                        actor.fireball_primarytime = time + WEP_CVAR_PRI(fireball, refire2) * W_WeaponRateFactor();
@@ -384,10 +384,10 @@ void W_Fireball_Attack2(void)
                        }
                        else if(fire & 2)
                        {
-                               if(weapon_prepareattack(thiswep, actor, true, WEP_CVAR_SEC(fireball, refire)))
+                               if(weapon_prepareattack(thiswep, actor, slot, true, WEP_CVAR_SEC(fireball, refire)))
                                {
                                        W_Fireball_Attack2();
-                                       weapon_thinkf(actor, WFRAME_FIRE2, WEP_CVAR_SEC(fireball, animtime), w_ready);
+                                       weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(fireball, animtime), w_ready);
                                }
                        }
                }