From: Mario Date: Tue, 16 Oct 2018 12:21:48 +0000 (+1000) Subject: Fix hagar's animation resetting after the first attack X-Git-Tag: xonotic-v0.8.5~1765 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=1711e406acf6c336cb6e9a15210543ae2d91ca06;p=xonotic%2Fxonotic-data.pk3dir.git Fix hagar's animation resetting after the first attack --- diff --git a/qcsrc/common/weapons/weapon/hagar.qc b/qcsrc/common/weapons/weapon/hagar.qc index 187ed765f..58be8f835 100644 --- a/qcsrc/common/weapons/weapon/hagar.qc +++ b/qcsrc/common/weapons/weapon/hagar.qc @@ -380,14 +380,8 @@ void W_Hagar_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity, int W_Hagar_Attack(thiswep, actor, weaponentity); ATTACK_FINISHED(actor, weaponentity) = time + WEP_CVAR_PRI(hagar, refire) * W_WeaponRateFactor(actor); - int theframe = WFRAME_FIRE1; - entity this = actor.(weaponentity); - if(this) - { - if(this.wframe == WFRAME_FIRE1) - theframe = WFRAME_DONTCHANGE; - } - weapon_thinkf(actor, weaponentity, theframe, WEP_CVAR_PRI(hagar, refire), W_Hagar_Attack_Auto); + actor.(weaponentity).wframe = WFRAME_FIRE1; + weapon_thinkf(actor, weaponentity, WFRAME_DONTCHANGE, WEP_CVAR_PRI(hagar, refire), W_Hagar_Attack_Auto); } METHOD(Hagar, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))