Skip to content

Commit

Permalink
Merge pull request #70 from malortie/fix-glock-anim
Browse files Browse the repository at this point in the history
Fixed glock fire on empty sequence not playing.
  • Loading branch information
SamVanheer authored Nov 20, 2021
2 parents a91bfa2 + 2115250 commit d4e8044
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cl_dll/ev_hldm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ void EV_FireGlock2( event_args_t *args )
Vector origin;
Vector angles;
Vector velocity;
int empty;

Vector ShellVelocity;
Vector ShellOrigin;
Expand All @@ -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
Expand All @@ -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 );
}
Expand Down

0 comments on commit d4e8044

Please sign in to comment.