X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Frpc.qc;h=bc86bdadab50e4d9dc0db60d7a16953fa310f214;hb=45419c41b4da92340152d6fffe1fa429769b6d6a;hp=5d8ba40284c605665b03afd59b2f8e8c37540d6b;hpb=e90b2d3690fab893b7c8e28ad5f7c67469ace2ec;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/rpc.qc b/qcsrc/common/weapons/weapon/rpc.qc index 5d8ba4028..bc86bdada 100644 --- a/qcsrc/common/weapons/weapon/rpc.qc +++ b/qcsrc/common/weapons/weapon/rpc.qc @@ -104,12 +104,12 @@ void W_RocketPropelledChainsaw_Think() self.nextthink = time; } -void W_RocketPropelledChainsaw_Attack (void) +void W_RocketPropelledChainsaw_Attack (Weapon thiswep) {SELFPARAM(); entity missile = spawn(); //WarpZone_RefSys_SpawnSameRefSys(self); entity flash = spawn (); - W_DecreaseAmmo(WEP_CVAR(rpc, ammo)); + W_DecreaseAmmo(thiswep, WEP_CVAR(rpc, ammo)); W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', false, 5, SND(ROCKET_FIRE), CH_WEAPON_A, WEP_CVAR(rpc, damage)); Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); PROJECTILE_MAKETRIGGER(missile); @@ -154,22 +154,22 @@ void W_RocketPropelledChainsaw_Attack (void) self.BUTTON_ATCK = bot_aim(WEP_CVAR(rpc, speed), 0, WEP_CVAR(rpc, lifetime), false); return true; } - METHOD(RocketPropelledChainsaw, wr_think, bool(entity thiswep)) + METHOD(RocketPropelledChainsaw, wr_think, bool(entity thiswep, bool fire1, bool fire2)) { if(WEP_CVAR(rpc, reload_ammo) && self.clip_load < WEP_CVAR(rpc, ammo)) _WEP_ACTION(self.weapon, WR_RELOAD); else { - if (self.BUTTON_ATCK) + if (fire1) { - if(weapon_prepareattack(0, WEP_CVAR(rpc, refire))) + if(weapon_prepareattack(false, WEP_CVAR(rpc, refire))) { - W_RocketPropelledChainsaw_Attack(); + W_RocketPropelledChainsaw_Attack(thiswep); weapon_thinkf(WFRAME_FIRE1, WEP_CVAR(rpc, animtime), w_ready); } } - if (self.BUTTON_ATCK2) + if (fire2) { // to-do }