Browse Source

Add HANDGRENADE_DEPLOY_FIX macros for fixing the handgrenade deploy animation after finishing a throw (#275)

hlfixed
Roman Chistokhodov 2 years ago committed by GitHub
parent
commit
763af29054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      CMakeLists.txt
  2. 2
      dlls/handgrenade.cpp

6
CMakeLists.txt

@ -65,6 +65,7 @@ option(CROWBAR_DELAY_FIX "Enable crowbar attack delay fix" OFF) @@ -65,6 +65,7 @@ option(CROWBAR_DELAY_FIX "Enable crowbar attack delay fix" OFF)
option(CROWBAR_FIX_RAPID_CROWBAR "Enable rapid crowbar fix" OFF)
option(GAUSS_OVERCHARGE_FIX "Enable gauss overcharge fix" OFF)
option(TRIPMINE_BEAM_DUPLICATION_FIX "Enable fix of tripmine beam duplication on level transition" OFF)
option(HANDGRENADE_DEPLOY_FIX "Enable handgrenade deploy animation fix after finishing a throw" OFF)
option(OEM_BUILD "Enable OEM Build" OFF)
option(HLDEMO_BUILD "Enable Demo Build" OFF)
@ -142,6 +143,11 @@ if(TRIPMINE_BEAM_DUPLICATION_FIX) @@ -142,6 +143,11 @@ if(TRIPMINE_BEAM_DUPLICATION_FIX)
add_definitions(-DTRIPMINE_BEAM_DUPLICATION_FIX)
endif()
if(HANDGRENADE_DEPLOY_FIX)
message(STATUS "Handgrenade deploy animation fix enabled")
add_definitions(-DHANDGRENADE_DEPLOY_FIX)
endif()
if(OEM_BUILD)
message(STATUS "OEM build enabled")
add_definitions(-DOEM_BUILD)

2
dlls/handgrenade.cpp

@ -173,7 +173,9 @@ void CHandGrenade::WeaponIdle( void ) @@ -173,7 +173,9 @@ void CHandGrenade::WeaponIdle( void )
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#if !HANDGRENADE_DEPLOY_FIX
m_flReleaseThrow = 0.0f;
#endif
m_flStartThrow = 0.0f;
m_flNextPrimaryAttack = GetNextAttackDelay( 0.5f );
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5f;

Loading…
Cancel
Save