Player Anim Fix

This commit is contained in:
Stephen 2023-01-07 17:19:14 -05:00 committed by LightCat
parent a0d9bc70a7
commit a755327517

View File

@ -50,10 +50,10 @@ bool ShouldInterpolate_hook(IClientEntity *ent)
if (ent && IDX_GOOD(ent->entindex()))
{
CachedEntity *cent = ENTITY(ent->entindex());
if (cent->m_Type() == ENTITY_PLAYER && cent->m_IDX != g_pLocalPlayer->entity_idx)
{
if (CE_BAD(cent))
return false;
if (cent->m_Type() == ENTITY_PLAYER && cent->m_IDX != g_pLocalPlayer->entity_idx)
return false;
}
}
}
ShouldInterpolate_t original = (ShouldInterpolate_t) shouldinterpolate_detour.GetOriginalFunc();
@ -87,7 +87,9 @@ void LevelInit()
previous_simtimes.resize(g_IEngine->GetMaxClients());
}
static InitRoutine init([]() {
static InitRoutine init(
[]()
{
static auto ShouldInterpolate_signature = CSignature::GetClientSignature("55 89 E5 56 53 83 EC 10 A1 ? ? ? ? 8B 5D ? 8B 10 89 04 24 FF 52 ? 8B 53");
shouldinterpolate_detour.Init(ShouldInterpolate_signature, (void *) ShouldInterpolate_hook);
@ -101,7 +103,8 @@ static InitRoutine init([]() {
EC::Register(
EC::Shutdown,
[]() {
[]()
{
frameadvance_detour.Shutdown();
// checkforsequencechange_detour.Shutdown();
frameadvance_detour.Shutdown();