-
Автор темы
- #1
Копался во фреймстейдже и ещё лазил в рейджботе, короче, сломалось всё нафиг. Думал проблема в этом:
либо в этом:
(это единственное, что я менял в фреймстейдже)
Вот собственно FrameStageNotify:
Но я комментил то что добавлял и ничего не изменилось. В чём может быть проблема? Баг работает всегда, даже если всё отключить в настройках меню и зайти на сервер. Без чита всё работает.
Помогите пофиксить это:
C++:
if (*(bool*)((uintptr_t)I::Input + 0xAD))
*(Vector*)((uintptr_t)hackManager.pLocal() + 0x31D8) = LastAngleAA;
C++:
if (curStage = FRAME_NET_UPDATE_POSTDATAUPDATE_END)
{
if (I::Engine->IsInGame() && I::Engine->IsConnected())
{
IClientEntity* pLocal = I::EntList->GetClientEntity(I::Engine->GetLocalPlayer());
for (auto i = 0; i < I::EntList->GetHighestEntityIndex(); i++)
{
IClientEntity *pEnt = (IClientEntity*)I::EntList->GetClientEntity(i);
if (pEnt->IsValidPlayer() && pEnt != pLocal)
{
pEnt->update_clientside_animation();
}
}
}
}
Вот собственно FrameStageNotify:
C++:
void __stdcall Hooked_FrameStageNotify(ClientFrameStage_t curStage)
{
DWORD eyeangles = NetVar.GetNetVar(0xBFEA4E7B);
IClientEntity *pLocal = I::EntList->GetClientEntity(I::Engine->GetLocalPlayer());
if (I::Engine->IsConnected() && I::Engine->IsInGame() && curStage == FRAME_RENDER_START)
{
}
if (curStage == FRAME_RENDER_START)
{
if (I::Engine->IsConnected() && I::Engine->IsInGame())
{
if (hackManager.pLocal() && hackManager.pLocal()->IsAlive())
{
IClientEntity* pLocal = hackManager.pLocal();
auto thirdperson = *(bool*)(reinterpret_cast<uintptr_t>(I::Input) + 0xA5);
if (thirdperson)
{
*(Vector*)((DWORD)hackManager.pLocal() + 0x31C8) = LastAngleAA;
}
if (*(bool*)((uintptr_t)I::Input + 0xAD))
*(Vector*)((uintptr_t)hackManager.pLocal() + 0x31D8) = LastAngleAA;
for (int i = 1; i <= I::EntList->GetHighestEntityIndex(); i++)
{
if (i == I::Engine->GetLocalPlayer()) continue;
IClientEntity* pEntity = I::EntList->GetClientEntity(i);
if (!pEntity || pEntity->IsDormant() || !pEntity->IsAlive())
continue;
if (pEntity->GetTeamNum() == pLocal->GetTeamNum() || !pLocal->IsAlive())
continue;
*(int*)((uintptr_t)pEntity + 0xA30) = I::Globals->framecount;
*(int*)((uintptr_t)pEntity + 0xA28) = 0;
}
}
}
//nightmode.SetSkybox();
}
if (curStage == FRAME_NET_UPDATE_POSTDATAUPDATE_START)
{
if (I::Engine->IsInGame() && I::Engine->IsConnected())
{
IClientEntity* pLocal = I::EntList->GetClientEntity(I::Engine->GetLocalPlayer());
for (auto i = 0; i < I::EntList->GetHighestEntityIndex(); i++)
{
IClientEntity *pEnt = (IClientEntity*)I::EntList->GetClientEntity(i);
if (pEnt->IsValidPlayer()) // && hackManager.pLocal()->IsAlive())
{
if (resolverconfig.iResolverMode == 3 && hackManager.pLocal()->IsAlive())
{
resolve->WriteData(pEnt);
}
if (resolverconfig.bBacktrack) DataManager.ReportMove(pEnt->GetAbsOrigin(), pEnt->GetIndex());
if (resolverconfig.iResolverMode == 1) // Beta
{
static float oldlby[65];
bool lby_updated;
const bool is_moving = pEnt->GetVelocity().Length2D() > 0.1;
static float last_moving_lby[64];
int storedmissedshots = 0;
if (*pEnt->GetLowerBodyYaw() != oldlby[pEnt->GetIndex()])
{
lby_updated = true;
oldlby[pEnt->GetIndex()] = *pEnt->GetLowerBodyYaw();
}
else
{
lby_updated = false;
}
if (lby_updated)
{
ResolverStage[pEnt->GetIndex()] = 2;
pEnt->GetEyeAngles()->y = *pEnt->GetLowerBodyYaw();
}
else if (is_moving)
{
ResolverStage[pEnt->GetIndex()] = 1;
last_moving_lby[pEnt->GetIndex()] = *pEnt->GetLowerBodyYaw();
pEnt->GetEyeAngles()->y = *pEnt->GetLowerBodyYaw();
storedmissedshots = globals.Shots;
}
else
{
if (storedmissedshots < globals.Shots)
{
switch (globals.Shots % 3)
{
case 0: pEnt->GetEyeAngles()->y = Bolbilize(CalcAngle69(*pEnt->GetOriginPtr(), *pLocal->GetOriginPtr()).y + 70); ResolverStage[pEnt->GetIndex()] = 4; break;
case 1: pEnt->GetEyeAngles()->y = Bolbilize(CalcAngle69(*pEnt->GetOriginPtr(), *pLocal->GetOriginPtr()).y - 180); ResolverStage[pEnt->GetIndex()] = 5; break;
case 2: pEnt->GetEyeAngles()->y = Bolbilize(CalcAngle69(*pEnt->GetOriginPtr(), *pLocal->GetOriginPtr()).y - 70); ResolverStage[pEnt->GetIndex()] = 6; break;
}
}
else
{
ResolverStage[pEnt->GetIndex()] = 3;
pEnt->GetEyeAngles()->y = last_moving_lby[pEnt->GetIndex()];
}
}
}
if (resolverconfig.iResolverMode == 2) // test before release
{
static float oldlby[65];
static float lastlby[65];
static float standtime[65];
static float lbystandtime[65];
static float last_moving_time[65];
bool lby_updated;
float bodyeyedelta = pEnt->GetEyeAngles()->y - *pEnt->GetLowerBodyYaw();
const bool is_moving = pEnt->GetVelocity().Length2D() > 0.1;
const bool could_be_slowmo = pEnt->GetVelocity().Length2D() < 40;
const bool is_crouching = *pEnt->GetFlags() & FL_DUCKING;
static float last_moving_lby[64];
standtime[pEnt->GetIndex()] = I::Globals->curtime - last_moving_time[pEnt->GetIndex()];
lbystandtime[pEnt->GetIndex()] = I::Globals->curtime - last_moving_time[pEnt->GetIndex()];
if (lbystandtime[pEnt->GetIndex()] >= 1.1)
{
lbystandtime[pEnt->GetIndex()] -= 1.1;
}
if (*pEnt->GetLowerBodyYaw() != oldlby[pEnt->GetIndex()])
{
lby_updated = true;
oldlby[pEnt->GetIndex()] = *pEnt->GetLowerBodyYaw();
}
else
{
lby_updated = false;
}
if (lby_updated)
{
pEnt->GetEyeAngles()->y = *pEnt->GetLowerBodyYaw();
}
else if (is_moving && !could_be_slowmo)
{
ResolverStage[pEnt->GetIndex()] = 1;
last_moving_lby[pEnt->GetIndex()] = *pEnt->GetLowerBodyYaw();
lastlby[pEnt->GetIndex()] = last_moving_lby[pEnt->GetIndex()];
last_moving_time[pEnt->GetIndex()] = I::Globals->curtime;
pEnt->GetEyeAngles()->y = *pEnt->GetLowerBodyYaw();
}
else if (lbystandtime[pEnt->GetIndex()] > 1.05 && lbystandtime[pEnt->GetIndex()] < 1.125)
{
ResolverStage[pEnt->GetIndex()] = 4;
pEnt->GetEyeAngles()->y = *pEnt->GetLowerBodyYaw();
}
else if (is_moving && !is_crouching)
{
ResolverStage[pEnt->GetIndex()] = 2;
pEnt->GetEyeAngles()->y = last_moving_lby[pEnt->GetIndex()];
}
else
{
if ((standtime[pEnt->GetIndex()]) > 7)
{
ResolverStage[pEnt->GetIndex()] = 3;
switch (globals.Shots % 3)
{
case 0: pEnt->GetEyeAngles()->y = Bolbilize(CalcAngle69(*pEnt->GetOriginPtr(), *pLocal->GetOriginPtr()).y + 120); break;
case 1: pEnt->GetEyeAngles()->y = Bolbilize(CalcAngle69(*pEnt->GetOriginPtr(), *pLocal->GetOriginPtr()).y + 180); break;
case 2: pEnt->GetEyeAngles()->y = Bolbilize(CalcAngle69(*pEnt->GetOriginPtr(), *pLocal->GetOriginPtr()).y - 120); break;
}
}
else
{
ResolverStage[pEnt->GetIndex()] = 2;
switch (globals.Shots % 3)
{
case 0: pEnt->GetEyeAngles()->y = last_moving_lby[pEnt->GetIndex()]; break;
case 1: pEnt->GetEyeAngles()->y = last_moving_lby[pEnt->GetIndex()] + 180; break;
}
}
}
}
if (resolverconfig.iResolverMode == 3)
{
resolve->Run(pEnt);
}
}
}
}
}
if (curStage = FRAME_NET_UPDATE_POSTDATAUPDATE_END)
{
if (I::Engine->IsInGame() && I::Engine->IsConnected())
{
IClientEntity* pLocal = I::EntList->GetClientEntity(I::Engine->GetLocalPlayer());
for (auto i = 0; i < I::EntList->GetHighestEntityIndex(); i++)
{
IClientEntity *pEnt = (IClientEntity*)I::EntList->GetClientEntity(i);
if (pEnt->IsValidPlayer() && pEnt != pLocal)
{
pEnt->update_clientside_animation();
}
}
}
}
oFrameStageNotify(curStage);
}
C++:
VMTClient.Initialise((DWORD*)I::Client);
oFrameStageNotify = (FrameStageNotifyFn)VMTClient.HookMethod((DWORD)&Hooked_FrameStageNotify, 37); // 36
C++:
void update_clientside_animation() {
typedef void(__thiscall *Fn)(void*);
//call_virtual<Fn>(this, 219)(this);
//VirtualFn(void)(PVOID);
return Virtual::CallVirtual< Fn >(this, 219)(this);
}
Помогите пофиксить это: