Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glock secondary attack does not play fire on empty sequence. #3168

Open
malortie opened this issue Nov 20, 2021 · 0 comments
Open

Glock secondary attack does not play fire on empty sequence. #3168

malortie opened this issue Nov 20, 2021 · 0 comments

Comments

@malortie
Copy link

The Glock secondary attack never plays the fire on empty sequence when firing the last bullet.

Below is the code in EV_FireGlock2 (Glock secondary attack event).

halflife/cl_dll/ev_hldm.cpp

Lines 517 to 524 in c7240b9

if ( EV_IsLocal( idx ) )
{
// Add muzzle flash to current weapon model
EV_MuzzleFlash();
gEngfuncs.pEventAPI->EV_WeaponAnimation( GLOCK_SHOOT, 2 );
V_PunchAxis( 0, -2.0 );
}

In EV_FireGlock1 (Glock primary attack event), the code checks if the clip is empty.

halflife/cl_dll/ev_hldm.cpp

Lines 473 to 479 in c7240b9

if ( EV_IsLocal( idx ) )
{
EV_MuzzleFlash();
gEngfuncs.pEventAPI->EV_WeaponAnimation( empty ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT, 2 );
V_PunchAxis( 0, -2.0 );
}

The secondary attack event should also include this check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant