Fix hagar's animation resetting after the first attack
authorMario <mario@smbclan.net>
Tue, 16 Oct 2018 12:21:48 +0000 (22:21 +1000)
committerMario <mario@smbclan.net>
Tue, 16 Oct 2018 12:21:48 +0000 (22:21 +1000)
qcsrc/common/weapons/weapon/hagar.qc

index 187ed765f46fc0cb60d41f139675d614ef936b3f..58be8f835f490ff3eac82c615a8257c8d047c27a 100644 (file)
@@ -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))