X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Frpc.qc;h=73794ca03aac47f72ce1e2b4e81b9223524dd4b7;hb=349aeb508e5a3d577df60bef8a552da2db7d928d;hp=28016f08ebf63633a041c6a5624758848a9a531a;hpb=547a4228c0f88d9b226efe1026ee6085309c0c89;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/rpc.qc b/qcsrc/common/weapons/weapon/rpc.qc index 28016f08e..73794ca03 100644 --- a/qcsrc/common/weapons/weapon/rpc.qc +++ b/qcsrc/common/weapons/weapon/rpc.qc @@ -13,7 +13,7 @@ CLASS(RocketPropelledChainsaw, Weapon) /* crosshair */ ATTRIB(RocketPropelledChainsaw, w_crosshair_size, float, 0.6); /* wepimg */ ATTRIB(RocketPropelledChainsaw, model2, string, "weaponrpc"); /* refname */ ATTRIB(RocketPropelledChainsaw, netname, string, "rpc"); -/* wepname */ ATTRIB(RocketPropelledChainsaw, message, string, _("Rocket Propelled Chainsaw")); +/* wepname */ ATTRIB(RocketPropelledChainsaw, m_name, string, _("Rocket Propelled Chainsaw")); ENDCLASS(RocketPropelledChainsaw) REGISTER_WEAPON(RPC, NEW(RocketPropelledChainsaw)); @@ -153,23 +153,23 @@ 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, bool fire1, bool fire2)) + METHOD(RocketPropelledChainsaw, wr_think, void(entity thiswep, entity actor, int slot, int fire)) { if(WEP_CVAR(rpc, reload_ammo) && actor.clip_load < WEP_CVAR(rpc, ammo)) { Weapon w = get_weaponinfo(actor.weapon); w.wr_reload(w); } else { - if (fire1) + if (fire & 1) { - if(weapon_prepareattack(thiswep, actor, false, WEP_CVAR(rpc, refire))) + if(weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR(rpc, refire))) { W_RocketPropelledChainsaw_Attack(thiswep); - weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR(rpc, animtime), w_ready); + weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR(rpc, animtime), w_ready); } } - if (fire2) + if (fire & 2) { // to-do }