-
Автор темы
- #1
C++:
_declspec(noinline)void StandardBlendingRules_Detour(C_BasePlayer* ent, CStudioHdr *hdr, Vector *pos, Quaternion *q, float curtime, int32_t bonemask)
{
if (ent != nullptr && *(int*)(uintptr_t(ent) + 0x64) <= 64 && ent != cheat::main::local())
{
auto boneMask = 0;
/*if (cheat::Cvars.RageBot_Enable.GetValue()
&& ent != cheat::main::local())
{*/
boneMask = bonemask;
// if (cheat::Cvars.RageBot_AdjustPositions.GetValue())
// boneMask = (0x100 | 0x200);
//}
//else
//{
// boneMask = bonemask;
//}
((StandardBlendingRules_t)OriginalStandardBlendingRules)(ent, hdr, pos, q, curtime, boneMask);
if (*(BYTE*)(uintptr_t(ent) + 0xF0) & 8)
*(BYTE*)(uintptr_t(ent) + 0xF0) &= ~8;
}
else
{
((StandardBlendingRules_t)OriginalStandardBlendingRules)(ent, hdr, pos, q, curtime, bonemask);
}
}
void __fastcall StandardBlendingRules(C_BasePlayer* a1, int a2, CStudioHdr *hdr, Vector *pos, Quaternion *q, float curtime, int32_t boneMask)
{
StandardBlendingRules_Detour(a1, hdr, pos, q, curtime, boneMask);
}