Browse Source

Fix bodies passed to EV_WeaponAnimation for opfor weapons (#309)

opforfixed
Roman Chistokhodov 2 years ago committed by GitHub
parent
commit
fdd08e93f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      cl_dll/ev_hldm.cpp

18
cl_dll/ev_hldm.cpp

@ -1863,7 +1863,7 @@ void EV_FireEagle( event_args_t *args )
{ {
// Add muzzle flash to current weapon model // Add muzzle flash to current weapon model
EV_MuzzleFlash(); EV_MuzzleFlash();
gEngfuncs.pEventAPI->EV_WeaponAnimation( EAGLE_SHOOT, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( EAGLE_SHOOT, 0 );
V_PunchAxis( 0, -4.0 ); V_PunchAxis( 0, -4.0 );
} }
@ -1932,13 +1932,13 @@ void EV_Knife( event_args_t *args )
switch( ( g_iSwing++ ) % 3 ) switch( ( g_iSwing++ ) % 3 )
{ {
case 0: case 0:
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK1MISS, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK1MISS, 0 );
break; break;
case 1: case 1:
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK2MISS, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK2MISS, 0 );
break; break;
case 2: case 2:
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK3MISS, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK3MISS, 0 );
break; break;
} }
} }
@ -2133,13 +2133,13 @@ void EV_PipeWrench( event_args_t *args )
switch( ( g_iSwing++ ) % 3 ) switch( ( g_iSwing++ ) % 3 )
{ {
case 0: case 0:
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK1MISS, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK1MISS, 0 );
break; break;
case 1: case 1:
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK2MISS, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK2MISS, 0 );
break; break;
case 2: case 2:
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK3MISS, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK3MISS, 0 );
break; break;
} }
} }
@ -2149,7 +2149,7 @@ void EV_PipeWrench( event_args_t *args )
gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/pwrench_big_miss.wav", 1, ATTN_NORM, 0, PITCH_NORM ); gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/pwrench_big_miss.wav", 1, ATTN_NORM, 0, PITCH_NORM );
// Send weapon anim. // Send weapon anim.
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACKBIGMISS, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACKBIGMISS, 0 );
} }
} }
} }
@ -2187,7 +2187,7 @@ void EV_ShockFire( event_args_t *args )
if( EV_IsLocal( idx ) ) if( EV_IsLocal( idx ) )
{ {
V_PunchAxis( 0, gEngfuncs.pfnRandomLong( 0, 2 ) ); V_PunchAxis( 0, gEngfuncs.pfnRandomLong( 0, 2 ) );
gEngfuncs.pEventAPI->EV_WeaponAnimation( SHOCK_FIRE, 1 ); gEngfuncs.pEventAPI->EV_WeaponAnimation( SHOCK_FIRE, 0 );
} }
// Play fire sound. // Play fire sound.

Loading…
Cancel
Save