From f58a59661cf83cb5f89a1385b4e5522e28b546df Mon Sep 17 00:00:00 2001 From: Kamay Xutax Date: Sat, 31 Aug 2024 07:20:09 +0200 Subject: [PATCH] Allow localplayer for AnimationEvents --- game/client/c_baseanimating.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game/client/c_baseanimating.cpp b/game/client/c_baseanimating.cpp index 5705127184..3bb0e3e516 100644 --- a/game/client/c_baseanimating.cpp +++ b/game/client/c_baseanimating.cpp @@ -9,6 +9,7 @@ #include "c_baseanimating.h" #include "c_sprite.h" #include "cdll_client_int.h" +#include "cdll_util.h" #include "convar.h" #include "iconvar.h" #include "interpolatedvar.h" @@ -4930,7 +4931,7 @@ void C_BaseAnimating::Simulate() } // TODO_ENHANCED: check if there's other stuff like this! This can break lag compensation. - if ( gpGlobals->frametime != 0.0f && m_bClientSideAnimation ) + if ( gpGlobals->frametime != 0.0f && (m_bClientSideAnimation || C_BasePlayer::GetLocalPlayer() == this) ) { DoAnimationEvents( GetModelPtr() ); }