From c8908043ab8bfe7e0bbc4d97313f53e8df48e896 Mon Sep 17 00:00:00 2001 From: tankefugl Date: Thu, 11 May 2006 01:05:09 +0000 Subject: [PATCH] o Fixed bug where +attack with charge selected could cause an infinite charge git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@474 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.2.0/source/cl_dll/input.cpp | 1 + releases/3.2.0/source/mod/AvHAlienAbilities.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/releases/3.2.0/source/cl_dll/input.cpp b/releases/3.2.0/source/cl_dll/input.cpp index 138b0d1c..1fa2bd56 100644 --- a/releases/3.2.0/source/cl_dll/input.cpp +++ b/releases/3.2.0/source/cl_dll/input.cpp @@ -1514,6 +1514,7 @@ void CL_ResetButtonBits( int bits ) { // totally clear state in_attack.state &= ~7; + in_attack2.state &= ~7; } } } diff --git a/releases/3.2.0/source/mod/AvHAlienAbilities.cpp b/releases/3.2.0/source/mod/AvHAlienAbilities.cpp index 32278da0..2beb3a71 100644 --- a/releases/3.2.0/source/mod/AvHAlienAbilities.cpp +++ b/releases/3.2.0/source/mod/AvHAlienAbilities.cpp @@ -58,6 +58,8 @@ #include "mod/AvHHud.h" extern int g_runfuncs; void IN_Attack2Down(); +void IN_Attack2Up(); +bool CheckInAttack(); #endif LINK_ENTITY_TO_CLASS(kwLeap, AvHLeap); @@ -303,7 +305,11 @@ void AvHCharge::SecondaryAttack() void AvHCharge::FireProjectiles(void) { #ifdef AVH_CLIENT - IN_Attack2Down(); + if (CheckInAttack()) + IN_Attack2Down(); + else + IN_Attack2Up(); + //gHUD.SetAlienAbility(this->GetAbilityImpulse()); #endif