X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Frpc.qc;h=73794ca03aac47f72ce1e2b4e81b9223524dd4b7;hb=349aeb508e5a3d577df60bef8a552da2db7d928d;hp=71ddaa6b58acd7f77bde45fbca2cb917c70123bf;hpb=7bd8f8562a392fda3ac881b1fbe2a35a5ef0f5c8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/rpc.qc b/qcsrc/common/weapons/weapon/rpc.qc index 71ddaa6b5..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)); @@ -47,7 +47,7 @@ RPC_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP) #endif #ifdef IMPLEMENTATION #ifdef SVQC -spawnfunc(weapon_rpc) { weapon_defaultspawnfunc(WEP_RPC.m_id); } +spawnfunc(weapon_rpc) { weapon_defaultspawnfunc(this, WEP_RPC); } void W_RocketPropelledChainsaw_Explode() {SELFPARAM(); @@ -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 }