-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
case 2:
if (!bSendPacket)
{
if (NextLBYUpdate())
pCmd->viewangles.y -= pLocal->GetLowerBodyYaw() + 160;
else
pCmd->viewangles.y -= pLocal->GetLowerBodyYaw() + 180;
}
else
{
if (NextLBYUpdate())
{
switch (pCmd->tick_count % 4)
{
case 0:
pCmd->viewangles.y = pLocal->GetLowerBodyYaw() - 90;
case 1:
pCmd->viewangles.y += 90;
case 2:
pCmd->viewangles.y = pLocal->GetLowerBodyYaw() - 90;
case 3:
pCmd->viewangles.y += 90;
}
}
}
break;
Код:
float GetLatency()
{
INetChannelInfo *nci = Interfaces::Engine->GetNetChannelInfo();
if (nci)
{
float Latency = nci->GetAvgLatency(FLOW_OUTGOING) + nci->GetAvgLatency(FLOW_INCOMING);
return Latency;
}
else
{
return 0.0f;
}
}
float GetOutgoingLatency()
{
INetChannelInfo *nci = Interfaces::Engine->GetNetChannelInfo();
if (nci)
{
float OutgoingLatency = nci->GetAvgLatency(FLOW_OUTGOING);
return OutgoingLatency;
}
else
{
return 0.0f;
}
}
float GetIncomingLatency()
{
INetChannelInfo *nci = Interfaces::Engine->GetNetChannelInfo();
if (nci)
{
float IncomingLatency = nci->GetAvgLatency(FLOW_INCOMING);
return IncomingLatency;
}
else
{
return 0.0f;
}
}
float OldLBY;
float LBYBreakerTimer;
float LastLBYUpdateTime;
bool bSwitch;
float CurrentVelocity(IClientEntity* LocalPlayer)
{
int vel = LocalPlayer->GetVelocity().Length2D();
return vel;
}
bool NextLBYUpdate()
{
IClientEntity* LocalPlayer = hackManager.pLocal();
float flServerTime = (float)(LocalPlayer->GetTickBase() * Interfaces::Globals->interval_per_tick);
if (OldLBY != LocalPlayer->GetLowerBodyYaw())
{
LBYBreakerTimer++;
OldLBY = LocalPlayer->GetLowerBodyYaw();
bSwitch = !bSwitch;
LastLBYUpdateTime = flServerTime;
}
if (CurrentVelocity(LocalPlayer) > 0.5)
{
LastLBYUpdateTime = flServerTime;
return false;
}
if ((LastLBYUpdateTime + 1 - (GetLatency() * 2) < flServerTime) && (LocalPlayer->GetFlags() & FL_ONGROUND))
{
if (LastLBYUpdateTime + 1.1 - (GetLatency() * 2) < flServerTime)
{
LastLBYUpdateTime += 1.1;
}
return true;
}
return false;
}
Последнее редактирование: