Fix bow-like weapon fire playing on empty sequence.

This commit is contained in:
Andrey Akhmichin 2022-10-29 00:25:41 +05:00
parent 4e85533681
commit 14c157f6fc
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
4 changed files with 8 additions and 8 deletions

View File

@ -1334,7 +1334,7 @@ void EV_FireBow( event_args_t *args )
{
if( args->iparam1 )
gEngfuncs.pEventAPI->EV_WeaponAnimation( BOW_FIRE1, 0 );
else if( args->iparam2 )
else
gEngfuncs.pEventAPI->EV_WeaponAnimation( BOW_FIRE3, 0 );
V_PunchAxis( 0, -2.0 );
@ -1404,7 +1404,7 @@ void EV_FireModman2( event_args_t *args )
{
if( args->iparam1 )
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE1, 0 );
else if( args->iparam2 )
else
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 0 );
}
@ -1481,7 +1481,7 @@ void EV_FireModman( event_args_t *args )
{
if( args->iparam1 )
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE1, 0 );
else if( args->iparam2 )
else
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 0 );
V_PunchAxis( 0, -2.0 );

View File

@ -334,7 +334,7 @@ void CBow::PrimaryAttack( void )
flags = 0;
#endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow2, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 );
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow2, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, 0, 0, 0 );
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
@ -378,7 +378,7 @@ void CBow::FireBolt()
flags = 0;
#endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usBow, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 );
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usBow, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, 0, 0, 0 );
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );

View File

@ -352,7 +352,7 @@ void CModman::FireSniperHorn()
flags = 0;
#endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usModman2, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 );
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usModman2, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, 0, 0, 0 );
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
@ -395,7 +395,7 @@ void CModman::FireHorn()
flags = 0;
#endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usModman, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 );
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usModman, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, 0, 0, 0 );
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );

View File

@ -311,7 +311,7 @@ void CNStar::FireStar()
flags = 0;
#endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usNStar, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 );
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usNStar, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, 0, 0, 0 );
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );