С++
-
Автор темы
- #1
1.
2.
C++:
void AnimFix(C_BaseEntity* pEnt)
{
auto backup_curtime = g_pGlobalVars->curtime;
auto backup_frametime = g_pGlobalVars->frametime;
g_pGlobalVars->curtime = pEnt->GetSimulatiomTime();
g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
if (pEnt->AnimState()->m_iLastClientSideUpdateAnimationFramecount == g_pGlobalVars->framecount)
pEnt->AnimState()->m_iLastClientSideUpdateAnimationFramecount = g_pGlobalVars->framecount - 1;
pEnt->ClientAnimations(true);
resolver(pEnt);
pEnt->UpdateClientAnimations();
pEnt->ClientAnimations(false);
g_pGlobalVars->curtime = backup_curtime;
g_pGlobalVars->frametime = backup_frametime;
pEnt->invalidate_bone_cache();
pEnt->setup_bones(nullptr, -1, 0x7FF00, g_pGlobalVars->curtime);
}
C++:
void AnimFix(C_BaseEntity* pEnt)
{
auto backup_curtime = g_pGlobalVars->curtime;
auto backup_frametime = g_pGlobalVars->frametime;
pEnt->ClientAnimations(true);
g_pGlobalVars->curtime = pEnt->GetSimulatiomTime();
g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
if (pEnt->AnimState()->m_iLastClientSideUpdateAnimationFramecount == g_pGlobalVars->framecount)
pEnt->AnimState()->m_iLastClientSideUpdateAnimationFramecount = g_pGlobalVars->framecount - 1;
resolver(pEnt);
pEnt->UpdateClientAnimations();
g_pGlobalVars->curtime = backup_curtime;
g_pGlobalVars->frametime = backup_frametime;
pEnt->invalidate_bone_cache();
pEnt->setup_bones(nullptr, -1, 0x7FF00, g_pGlobalVars->curtime);
pEnt->ClientAnimations(false);
}