X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Foverkill%2Fokhmg.qc;h=31db0c4db92e2663a54f0b3a9f0069220a8848a8;hb=1ce1c9c94867fb8ac44ab09c93eb092341dd6d9a;hp=df55fb88c42a4663b96b9aaa5a6f3b61d908692f;hpb=ad2d918472c84295255fba550959b58cacc9cfb1;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qc b/qcsrc/common/mutators/mutator/overkill/okhmg.qc index df55fb88c..31db0c4db 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qc +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qc @@ -36,14 +36,11 @@ void W_OverkillHeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity } float okhmg_spread = bound(WEP_CVAR_PRI(okhmg, spread_min), WEP_CVAR_PRI(okhmg, spread_min) + (WEP_CVAR_PRI(okhmg, spread_add) * actor.(weaponentity).misc_bulletcounter), WEP_CVAR_PRI(okhmg, spread_max)); - fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okhmg_spread, WEP_CVAR_PRI(okhmg, solidpenetration), WEP_CVAR_PRI(okhmg, damage), WEP_CVAR_PRI(okhmg, force), WEP_OVERKILL_HMG.m_id, EFFECT_RIFLE); + fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okhmg_spread, WEP_CVAR_PRI(okhmg, solidpenetration), WEP_CVAR_PRI(okhmg, damage), 0, WEP_CVAR_PRI(okhmg, force), WEP_OVERKILL_HMG.m_id, EFFECT_RIFLE); actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1; - Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); - - W_MachineGun_MuzzleFlash(actor, weaponentity); - W_AttachToShotorg(actor, weaponentity, actor.(weaponentity).muzzle_flash, '5 0 0'); + W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); if (autocvar_g_casings >= 2) // casing code { @@ -57,10 +54,8 @@ void W_OverkillHeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity METHOD(OverkillHeavyMachineGun, wr_aim, void(entity thiswep, entity actor, .entity weaponentity)) { - if(vdist(actor.origin - actor.enemy.origin, <, 3000 - bound(0, skill, 10) * 200)) - PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false); - else - PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false); + if(vdist(actor.origin - actor.enemy.origin, <, 3000 - bound(0, skill, 10) * 200)) + PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false); } METHOD(OverkillHeavyMachineGun, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) @@ -74,14 +69,11 @@ METHOD(OverkillHeavyMachineGun, wr_think, void(entity thiswep, entity actor, .en (actor.(weaponentity).wframe == WFRAME_FIRE2)) { // Set secondary fire animation. - vector a = '0 0 0'; actor.(weaponentity).wframe = WFRAME_FIRE2; - a = actor.(weaponentity).anim_fire2; - a.z *= g_weaponratefactor; FOREACH_CLIENT(true, LAMBDA( if (it == actor || (IS_SPEC(it) && it.enemy == actor)) { - wframe_send(it, actor.(weaponentity), a, true); + wframe_send(it, actor.(weaponentity), WFRAME_FIRE2, g_weaponratefactor, true); } )); animdecide_setaction(actor, ANIMACTION_SHOOT, true);