]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/rpc.qc
Weapons: pass weaponentity field instead of slot
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / rpc.qc
index f25bef42fb21778ae9b99d609aa5078a08c9e75a..fa037e00b0477d80eecfb301748cca20b1e8e05b 100644 (file)
@@ -153,7 +153,7 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
                {
                        self.BUTTON_ATCK = bot_aim(WEP_CVAR(rpc, speed), 0, WEP_CVAR(rpc, lifetime), false);
                }
-               METHOD(RocketPropelledChainsaw, wr_think, void(entity thiswep, entity actor, int slot, int fire))
+               METHOD(RocketPropelledChainsaw, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
                {
                        if(WEP_CVAR(rpc, reload_ammo) && actor.clip_load < WEP_CVAR(rpc, ammo)) {
                                Weapon w = get_weaponinfo(actor.weapon);
@@ -162,10 +162,10 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
                        {
                                if (fire & 1)
                                {
-                                       if(weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR(rpc, refire)))
+                                       if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(rpc, refire)))
                                        {
                                                W_RocketPropelledChainsaw_Attack(thiswep);
-                                               weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR(rpc, animtime), w_ready);
+                                               weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(rpc, animtime), w_ready);
                                        }
                                }