@ -486,7 +486,7 @@ static void EV_FireGlock_Impl( event_args_t *args )
if ( EV_IsLocal ( idx ) )
if ( EV_IsLocal ( idx ) )
{
{
EV_MuzzleFlash ( ) ;
EV_MuzzleFlash ( ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( empty ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT , 2 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( empty ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT , 0 ) ;
V_PunchAxis ( 0 , - 2.0 ) ;
V_PunchAxis ( 0 , - 2.0 ) ;
}
}
@ -549,7 +549,7 @@ void EV_FireShotGunDouble( 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 ( SHOTGUN_FIRE2 , 2 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( SHOTGUN_FIRE2 , 0 ) ;
V_PunchAxis ( 0 , - 10.0 ) ;
V_PunchAxis ( 0 , - 10.0 ) ;
}
}
@ -603,7 +603,7 @@ void EV_FireShotGunSingle( 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 ( SHOTGUN_FIRE , 2 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( SHOTGUN_FIRE , 0 ) ;
V_PunchAxis ( 0 , - 5.0 ) ;
V_PunchAxis ( 0 , - 5.0 ) ;
}
}
@ -660,7 +660,7 @@ void EV_FireMP5( 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 ( MP5_FIRE1 + gEngfuncs . pfnRandomLong ( 0 , 2 ) , 2 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( MP5_FIRE1 + gEngfuncs . pfnRandomLong ( 0 , 2 ) , 0 ) ;
V_PunchAxis ( 0 , gEngfuncs . pfnRandomFloat ( - 2 , 2 ) ) ;
V_PunchAxis ( 0 , gEngfuncs . pfnRandomFloat ( - 2 , 2 ) ) ;
}
}
@ -697,7 +697,7 @@ void EV_FireMP52( event_args_t *args )
if ( EV_IsLocal ( idx ) )
if ( EV_IsLocal ( idx ) )
{
{
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( MP5_LAUNCH , 2 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( MP5_LAUNCH , 0 ) ;
V_PunchAxis ( 0 , - 10 ) ;
V_PunchAxis ( 0 , - 10 ) ;
}
}
@ -862,7 +862,7 @@ void EV_FireGauss( event_args_t *args )
if ( EV_IsLocal ( idx ) )
if ( EV_IsLocal ( idx ) )
{
{
V_PunchAxis ( 0.0f , - 2.0f ) ;
V_PunchAxis ( 0.0f , - 2.0f ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( GAUSS_FIRE2 , 2 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( GAUSS_FIRE2 , 0 ) ;
if ( m_fPrimaryFire = = false )
if ( m_fPrimaryFire = = false )
g_flApplyVel = flDamage ;
g_flApplyVel = flDamage ;
@ -1129,13 +1129,13 @@ void EV_Crowbar( event_args_t *args )
switch ( ( g_iSwing + + ) % 3 )
switch ( ( g_iSwing + + ) % 3 )
{
{
case 0 :
case 0 :
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROWBAR_ATTACK1MISS , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROWBAR_ATTACK1MISS , 0 ) ;
break ;
break ;
case 1 :
case 1 :
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROWBAR_ATTACK2MISS , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROWBAR_ATTACK2MISS , 0 ) ;
break ;
break ;
case 2 :
case 2 :
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROWBAR_ATTACK3MISS , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROWBAR_ATTACK3MISS , 0 ) ;
break ;
break ;
}
}
}
}
@ -1203,9 +1203,9 @@ void EV_FireCrossbow2( event_args_t *args )
if ( EV_IsLocal ( idx ) )
if ( EV_IsLocal ( idx ) )
{
{
if ( args - > iparam1 )
if ( args - > iparam1 )
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROSSBOW_FIRE1 , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROSSBOW_FIRE1 , 0 ) ;
else
else
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROSSBOW_FIRE3 , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROSSBOW_FIRE3 , 0 ) ;
}
}
// Store off the old count
// Store off the old count
@ -1279,9 +1279,9 @@ void EV_FireCrossbow( event_args_t *args )
if ( EV_IsLocal ( idx ) )
if ( EV_IsLocal ( idx ) )
{
{
if ( args - > iparam1 )
if ( args - > iparam1 )
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROSSBOW_FIRE1 , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROSSBOW_FIRE1 , 0 ) ;
else
else
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROSSBOW_FIRE3 , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( CROSSBOW_FIRE3 , 0 ) ;
V_PunchAxis ( 0.0f , - 2.0f ) ;
V_PunchAxis ( 0.0f , - 2.0f ) ;
}
}
@ -1321,7 +1321,7 @@ void EV_FireRpg( event_args_t *args )
//Only play the weapon anims if I shot it.
//Only play the weapon anims if I shot it.
if ( EV_IsLocal ( idx ) )
if ( EV_IsLocal ( idx ) )
{
{
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( RPG_FIRE2 , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( RPG_FIRE2 , 0 ) ;
V_PunchAxis ( 0 , - 5.0 ) ;
V_PunchAxis ( 0 , - 5.0 ) ;
}
}
@ -1422,7 +1422,7 @@ void EV_EgonFire( event_args_t *args )
//Only play the weapon anims if I shot it.
//Only play the weapon anims if I shot it.
if ( EV_IsLocal ( idx ) )
if ( EV_IsLocal ( idx ) )
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( g_fireAnims1 [ gEngfuncs . pfnRandomLong ( 0 , 3 ) ] , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( g_fireAnims1 [ gEngfuncs . pfnRandomLong ( 0 , 3 ) ] , 0 ) ;
if ( iStartup = = 1 & & EV_IsLocal ( idx ) & & ! ( pBeam | | pBeam2 | | pFlare ) & & cl_lw - > value ) //Adrian: Added the cl_lw check for those lital people that hate weapon prediction.
if ( iStartup = = 1 & & EV_IsLocal ( idx ) & & ! ( pBeam | | pBeam2 | | pFlare ) & & cl_lw - > value ) //Adrian: Added the cl_lw check for those lital people that hate weapon prediction.
{
{
@ -1564,7 +1564,7 @@ void EV_HornetGunFire( 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 ( HGUN_SHOOT , 1 ) ;
gEngfuncs . pEventAPI - > EV_WeaponAnimation ( HGUN_SHOOT , 0 ) ;
}
}
switch ( gEngfuncs . pfnRandomLong ( 0 , 2 ) )
switch ( gEngfuncs . pfnRandomLong ( 0 , 2 ) )