From ec2826a96a9e734479df8c6e0033d552874b4c19 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lortie Date: Sun, 21 Nov 2021 05:21:36 -0500 Subject: [PATCH] Fixed crossbow fire on empty sequence not playing. (#207) --- cl_dll/ev_hldm.cpp | 4 ++-- dlls/crossbow.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index a5011f33..31fcfd17 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -1246,7 +1246,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 ); } @@ -1322,7 +1322,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.0f, -2.0f ); diff --git a/dlls/crossbow.cpp b/dlls/crossbow.cpp index c7b04f77..9432b04f 100644 --- a/dlls/crossbow.cpp +++ b/dlls/crossbow.cpp @@ -374,7 +374,7 @@ void CCrossbow::FireSniperBolt() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow2, 0.0f, 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.0f, g_vecZero, g_vecZero, 0, 0, m_iClip, 0, 0, 0 ); // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); @@ -417,7 +417,7 @@ void CCrossbow::FireBolt() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow, 0.0f, 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.0f, g_vecZero, g_vecZero, 0, 0, m_iClip, 0, 0, 0 ); // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 );