From 2115250c74892fe50dfed73c2008116e6df3367e Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lortie Date: Sat, 20 Nov 2021 08:09:00 -0500 Subject: [PATCH] Fixed glock fire on empty sequence not playing. --- cl_dll/ev_hldm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index 1365abc5b..88e9b8bcd 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -459,6 +459,7 @@ void EV_FireGlock2( event_args_t *args ) Vector origin; Vector angles; Vector velocity; + int empty; Vector ShellVelocity; Vector ShellOrigin; @@ -472,6 +473,7 @@ void EV_FireGlock2( event_args_t *args ) VectorCopy( args->angles, angles ); VectorCopy( args->velocity, velocity ); + empty = args->bparam1; AngleVectors( angles, forward, right, up ); shell = gEngfuncs.pEventAPI->EV_FindModelIndex ("models/shell.mdl");// brass shell @@ -480,7 +482,7 @@ void EV_FireGlock2( event_args_t *args ) { // Add muzzle flash to current weapon model EV_MuzzleFlash(); - gEngfuncs.pEventAPI->EV_WeaponAnimation( GLOCK_SHOOT, 2 ); + gEngfuncs.pEventAPI->EV_WeaponAnimation( empty ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT, 2 ); V_PunchAxis( 0, -2.0 ); }