-
Автор темы
- #1
C++:
void __fastcall Hooks::hkStandardBlendingRules(void* ecx, void* edx, c_studio_hdr* hdr, Vector* pos, Quaternion* q, float curTime, int boneMask) {
// since this function are meant to be for DT_BasePlayer vtable, we know that the pointer was for BaseEntity.
auto e = (BaseEntity*)ecx;
// if the pointer a.k.a the player didn't exist in the world or not alive do not call this function.
if (!e || !e->IsAlive())
return STANDARDBLENDINGRULES(ecx, hdr, pos, q, curTime, boneMask);
// disable interpolation.
e->m_fEffects() |= 8;
// call original.
STANDARDBLENDINGRULES(ecx, hdr, pos, q, curTime, boneMask);
// enable interpolation.
e->m_fEffects() &= ~8;
}