From 00861b552d99f494b071c39b26c7066a3682c748 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Tue, 31 Dec 2024 14:35:01 +0500 Subject: [PATCH] Fix viewmodel desync when switching while +attack held (https://github.com/ValveSoftware/halflife/issues/3819). --- dlls/player.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/player.cpp b/dlls/player.cpp index f9a633da6..3256be8a0 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -3203,6 +3203,9 @@ void CBasePlayer::SelectItem( const char *pstr ) if( pItem == m_pActiveItem ) return; + if( !pItem->CanDeploy()) + return; + ResetAutoaim(); // FIX, this needs to queue them up and delay @@ -3233,6 +3236,9 @@ void CBasePlayer::SelectLastItem( void ) return; } + if( !m_pLastItem->CanDeploy()) + return; + ResetAutoaim(); // FIX, this needs to queue them up and delay