Player Anim Fix
This commit is contained in:
parent
a0d9bc70a7
commit
a755327517
@ -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,25 +87,28 @@ void LevelInit()
|
||||
previous_simtimes.resize(g_IEngine->GetMaxClients());
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
/*static auto CheckForSequenceChange_signature = gSignatures.GetClientSignature("55 89 E5 57 56 53 83 EC 1C 8B 45 ? 8B 75 ? 8B 4D ? 8B 7D");
|
||||
checkforsequencechange_detour.Init(CheckForSequenceChange_signature, (void *) CheckForSequenceChange_hook);*/
|
||||
/*static auto CheckForSequenceChange_signature = gSignatures.GetClientSignature("55 89 E5 57 56 53 83 EC 1C 8B 45 ? 8B 75 ? 8B 4D ? 8B 7D");
|
||||
checkforsequencechange_detour.Init(CheckForSequenceChange_signature, (void *) CheckForSequenceChange_hook);*/
|
||||
|
||||
static auto FrameAdvance_signature = gSignatures.GetClientSignature("55 89 E5 57 56 53 83 EC 4C 8B 5D ? 80 BB ? ? ? ? 00 0F 85 ? ? ? ? 8B B3");
|
||||
frameadvance_detour.Init(FrameAdvance_signature, (void *) FrameAdvance_hook);
|
||||
EC::Register(EC::LevelInit, LevelInit, "levelinit_animfix");
|
||||
LevelInit();
|
||||
static auto FrameAdvance_signature = gSignatures.GetClientSignature("55 89 E5 57 56 53 83 EC 4C 8B 5D ? 80 BB ? ? ? ? 00 0F 85 ? ? ? ? 8B B3");
|
||||
frameadvance_detour.Init(FrameAdvance_signature, (void *) FrameAdvance_hook);
|
||||
EC::Register(EC::LevelInit, LevelInit, "levelinit_animfix");
|
||||
LevelInit();
|
||||
|
||||
EC::Register(
|
||||
EC::Shutdown,
|
||||
[]() {
|
||||
frameadvance_detour.Shutdown();
|
||||
// checkforsequencechange_detour.Shutdown();
|
||||
frameadvance_detour.Shutdown();
|
||||
},
|
||||
"shutdown_animfix");
|
||||
});
|
||||
EC::Register(
|
||||
EC::Shutdown,
|
||||
[]()
|
||||
{
|
||||
frameadvance_detour.Shutdown();
|
||||
// checkforsequencechange_detour.Shutdown();
|
||||
frameadvance_detour.Shutdown();
|
||||
},
|
||||
"shutdown_animfix");
|
||||
});
|
||||
} // namespace hacks::tf2::animfix
|
||||
|
Reference in New Issue
Block a user