X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fhmg.qc;h=5e48c2840999f6f814349ab64d7678bd523bc584;hp=8e5398745f5eeb8c5227c942d3c5501a8e61608c;hb=047e80d3190ef626c6029a655677ff1a08e66e3a;hpb=8a87299cb1f427c1cffa4b83398dabe4eea8bf08 diff --git a/qcsrc/common/weapons/weapon/hmg.qc b/qcsrc/common/weapons/weapon/hmg.qc index 8e5398745..5e48c2840 100644 --- a/qcsrc/common/weapons/weapon/hmg.qc +++ b/qcsrc/common/weapons/weapon/hmg.qc @@ -45,11 +45,11 @@ HMG_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP) void spawnfunc_weapon_hmg() { weapon_defaultspawnfunc(WEP_HMG.m_id); } -void W_HeavyMachineGun_Attack_Auto() +void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2) {SELFPARAM(); if (!self.BUTTON_ATCK) { - w_ready(); + w_ready(thiswep, fire1, fire2); return; } @@ -57,11 +57,11 @@ void W_HeavyMachineGun_Attack_Auto() if(!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { W_SwitchWeapon_Force(self, w_getbestweapon(self)); - w_ready(); + w_ready(thiswep, fire1, fire2); return; } - W_DecreaseAmmo(WEP_CVAR(hmg, ammo)); + W_DecreaseAmmo(WEP_HMG, WEP_CVAR(hmg, ammo)); W_SetupShot (self, true, 0, SND(UZI_FIRE), CH_WEAPON_A, WEP_CVAR(hmg, damage)); @@ -97,17 +97,17 @@ void W_HeavyMachineGun_Attack_Auto() return true; } - METHOD(HeavyMachineGun, wr_think, bool(entity thiswep)) + METHOD(HeavyMachineGun, wr_think, bool(entity thiswep, bool fire1, bool fire2)) { if(WEP_CVAR(hmg, reload_ammo) && self.clip_load < WEP_CVAR(hmg, ammo)) // forced reload _WEP_ACTION(self.weapon, WR_RELOAD); else { - if (self.BUTTON_ATCK) + if (fire1) if (weapon_prepareattack(0, 0)) { self.misc_bulletcounter = 0; - W_HeavyMachineGun_Attack_Auto(); + W_HeavyMachineGun_Attack_Auto(thiswep, fire1, fire2); } }