coder of the year
-
Автор темы
- #1
C++:
void Resolver::FrameStage(ClientFrameStage_t stage)
{
if (!Globals::LocalPlayer || !g_pEngine->IsInGame())
return;
static bool wasDormant[65];
for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
{
C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);
if (!pPlayerEntity
|| !pPlayerEntity->IsAlive())
continue;
if (pPlayerEntity->IsDormant())
{
wasDormant[i] = true;
continue;
}
if (stage == FRAME_RENDER_START)
{
HandleHits(pPlayerEntity); // Идентификатор "Handlehits" не определен
AnimationFix(pPlayerEntity);
}
if (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START) {
HandleBackUpResolve(pPlayerEntity);
}
if (stage == FRAME_NET_UPDATE_END && pPlayerEntity != Globals::LocalPlayer)
{
auto VarMap = reinterpret_cast<uintptr_t>(pPlayerEntity) + 36;
auto VarMapSize = *reinterpret_cast<int*>(VarMap + 20);
for (auto index = 0; index < VarMapSize; index++)
*reinterpret_cast<uintptr_t*>(*reinterpret_cast<uintptr_t*>(VarMap) + index * 12) = 0;
}
wasDormant[i] = false;
}
}