mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 13:14:51 +00:00
Fix bodies passed to EV_WeaponAnimation for opfor weapons (#309)
This commit is contained in:
parent
349dbe6e66
commit
fdd08e93f7
@ -1863,7 +1863,7 @@ void EV_FireEagle( event_args_t *args )
|
||||
{
|
||||
// Add muzzle flash to current weapon model
|
||||
EV_MuzzleFlash();
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( EAGLE_SHOOT, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( EAGLE_SHOOT, 0 );
|
||||
|
||||
V_PunchAxis( 0, -4.0 );
|
||||
}
|
||||
@ -1932,13 +1932,13 @@ void EV_Knife( event_args_t *args )
|
||||
switch( ( g_iSwing++ ) % 3 )
|
||||
{
|
||||
case 0:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK1MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK1MISS, 0 );
|
||||
break;
|
||||
case 1:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK2MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK2MISS, 0 );
|
||||
break;
|
||||
case 2:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK3MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( KNIFE_ATTACK3MISS, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2133,13 +2133,13 @@ void EV_PipeWrench( event_args_t *args )
|
||||
switch( ( g_iSwing++ ) % 3 )
|
||||
{
|
||||
case 0:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK1MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK1MISS, 0 );
|
||||
break;
|
||||
case 1:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK2MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK2MISS, 0 );
|
||||
break;
|
||||
case 2:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK3MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( PIPEWRENCH_ATTACK3MISS, 0 );
|
||||
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 );
|
||||
|
||||
// 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 ) )
|
||||
{
|
||||
V_PunchAxis( 0, gEngfuncs.pfnRandomLong( 0, 2 ) );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( SHOCK_FIRE, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( SHOCK_FIRE, 0 );
|
||||
}
|
||||
|
||||
// Play fire sound.
|
||||
|
Loading…
x
Reference in New Issue
Block a user