Skip to content

Commit

Permalink
Fixed crossbow fire on empty sequence not playing.
Browse files Browse the repository at this point in the history
  • Loading branch information
malortie committed Nov 19, 2021
1 parent c5b1932 commit e5d1c74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cl_dll/ev_hldm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ void EV_FireCrossbow2( event_args_t *args )
{
if ( args->iparam1 )
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE1, 1 );
else if ( args->iparam2 )
else
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 1 );
}

Expand Down Expand Up @@ -1235,7 +1235,7 @@ void EV_FireCrossbow( event_args_t *args )
{
if ( args->iparam1 )
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE1, 1 );
else if ( args->iparam2 )
else
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 1 );

V_PunchAxis( 0, -2.0 );
Expand Down
4 changes: 2 additions & 2 deletions dlls/crossbow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void CCrossbow::FireSniperBolt()
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 );
Expand Down Expand Up @@ -382,7 +382,7 @@ void CCrossbow::FireBolt()
flags = 0;
#endif

PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow, 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_usCrossbow, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, 0, 0, 0 );

// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
Expand Down

0 comments on commit e5d1c74

Please sign in to comment.