From bb2844b30b94527371fcb85fffdc4233d13a422e Mon Sep 17 00:00:00 2001 From: speedvoltage <32344549+speedvoltage@users.noreply.github.com> Date: Thu, 6 Mar 2025 15:26:41 +0100 Subject: [PATCH] Move .357 snap after firing to client-side --- src/game/shared/hl2mp/weapon_357.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/game/shared/hl2mp/weapon_357.cpp b/src/game/shared/hl2mp/weapon_357.cpp index d943f2787..5dd38906e 100644 --- a/src/game/shared/hl2mp/weapon_357.cpp +++ b/src/game/shared/hl2mp/weapon_357.cpp @@ -11,6 +11,7 @@ #ifdef CLIENT_DLL #include "c_hl2mp_player.h" + #include #else #include "hl2mp_player.h" #endif @@ -133,16 +134,18 @@ void CWeapon357::PrimaryAttack( void ) // Fire the bullets, and force the first shot to be perfectly accuracy pPlayer->FireBullets( info ); +#ifdef CLIENT_DLL //Disorient the player - QAngle angles = pPlayer->GetLocalAngles(); - - angles.x += random->RandomInt( -1, 1 ); - angles.y += random->RandomInt( -1, 1 ); - angles.z = 0; - -#ifndef CLIENT_DLL - pPlayer->SnapEyeAngles( angles ); -#endif + if ( prediction->IsFirstTimePredicted() ) + { + QAngle angles; + engine->GetViewAngles( angles ); + angles.x += random->RandomInt( -1, 1 ); + angles.y += random->RandomInt( -1, 1 ); + angles.z += 0.0f; + engine->SetViewAngles( angles ); + } +#endif // CLIENT_DLL pPlayer->ViewPunch( QAngle( -8, random->RandomFloat( -2, 2 ), 0 ) );