Synced Fake Ping

Posts 1–2 of 2 · Page 1 of 1
Synced Fake Ping
This code is used for faking your ping to the server, useful for extending your backtrack window. Do take note of player_lagcompensation.cpp for the time window of which you can backtrack. Increasing your latency to really high levels is detrimental to your ability to hit players that are going to peek you, due to the delay. You must get creative if you wish to deal with these scenarios

Code:
Code: int __fastcall Hooks::SendDatagram(INetChannel* netchan, void*, bf_write* datagram) { if (DisableAllChk.Checked || !BacktrackExploitChk.Checked || datagram) { return oSendDatagram(netchan, datagram); } int instate = netchan->m_nInReliableState; int insequencenr = netchan->m_nInSequenceNr; gLagCompensation.AddLatencyToNetchan(netchan, FAKE_LATENCY_AMOUNT); int ret = oSendDatagram(netchan, datagram); netchan->m_nInReliableState = instate; netchan->m_nInSequenceNr = insequencenr; return ret; } void LagCompensation::AddLatencyToNetchan(INetChannel *netchan, float Latency) { for (auto& seq : sequences) { if (Interfaces::Globals->realtime - seq.curtime >= Latency) { netchan->m_nInReliableState = seq.inreliablestate; netchan->m_nInSequenceNr = seq.sequencenr; break; } } } void LagCompensation::UpdateIncomingSequences() { DWORD ClientState = (DWORD)*(DWORD*)pClientState; if (ClientState) { INetChannel *netchan = (INetChannel*)*(DWORD*)(ClientState + 0x9C); if (netchan) { if (netchan->m_nInSequenceNr > lastincomingsequencenumber) { lastincomingsequencenumber = netchan->m_nInSequenceNr; sequences.push_front(CIncomingSequence(netchan->m_nInReliableState, netchan->m_nOutReliableState, netchan->m_nInSequenceNr, Interfaces::Globals->realtime)); } if (sequences.size() > 2048) sequences.pop_back(); } } }
Moved to proper section
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us