Allow localplayer for AnimationEvents

This commit is contained in:
Kamay Xutax 2024-08-31 07:20:09 +02:00
parent d942381df3
commit f58a59661c

View file

@ -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() );
}