2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 09:57:21 +01:00

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

This commit is contained in:
Roman Chistokhodov 2022-07-18 16:13:58 +03:00 committed by GitHub
parent 1313bb1b66
commit 763af29054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -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)
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)

View File

@ -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;