]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/crylink.qc
Weapons: pass weaponentity field instead of slot
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / crylink.qc
index 11e6924d81360585208297ba95eebed0672c27ff..af8b34c4a7d4837b3baeb971c9fe4bf49a496cc6 100644 (file)
@@ -574,7 +574,7 @@ void W_Crylink_Attack2(Weapon thiswep)
                        else
                                self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), false);
                }
-               METHOD(Crylink, wr_think, void(entity thiswep, entity actor, int slot, int fire))
+               METHOD(Crylink, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
                {
                        if(autocvar_g_balance_crylink_reload_ammo && actor.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) { // forced reload
                                Weapon w = get_weaponinfo(actor.weapon);
@@ -584,20 +584,20 @@ void W_Crylink_Attack2(Weapon thiswep)
                        if(fire & 1)
                        {
                                if(actor.crylink_waitrelease != 1)
-                               if(weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR_PRI(crylink, refire)))
+                               if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(crylink, refire)))
                                {
                                        W_Crylink_Attack(thiswep);
-                                       weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
+                                       weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
                                }
                        }
 
                        if((fire & 2) && autocvar_g_balance_crylink_secondary)
                        {
                                if(actor.crylink_waitrelease != 2)
-                               if(weapon_prepareattack(thiswep, actor, slot, true, WEP_CVAR_SEC(crylink, refire)))
+                               if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(crylink, refire)))
                                {
                                        W_Crylink_Attack2(thiswep);
-                                       weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
+                                       weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
                                }
                        }