Исходник Гайд Fix BackTrack weave

Забаненный
Статус
Оффлайн
Регистрация
10 Дек 2018
Сообщения
308
Реакции[?]
28
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Фикшеный BackTrack для нашего любимого ваве:

C++:
#include "Hooks.h"
#include "RageBackTracking.h"
#include "Ragebot.h"
#include "Resolver.h"
#include "AntiAims.h"
CMBacktracking* g_Backtrack = new CMBacktracking();

static std::deque<CIncomingSequence>sequences;
static int lastincomingsequencenumber;
int Real_m_nInSequencenumber;

void CMBacktracking::UpdateIncomingSequences()
{
    if (!csgo->client_state)
        return;
    DWORD ClientState = (DWORD) * (DWORD*)csgo->client_state;
    if (ClientState)
    {
        INetChannel* netchan = interfaces.engine->GetNetChannel();
        if (netchan)
        {
            if (netchan->iInSequenceNr > lastincomingsequencenumber)
            {
                lastincomingsequencenumber = netchan->iInSequenceNr;
                sequences.push_front(CIncomingSequence(netchan->iInReliableState, netchan->iOutReliableState, netchan->iInSequenceNr, interfaces.global_vars->realtime));
            }

            if (sequences.size() > 2048)
                sequences.pop_back();
        }
    }
}

void CMBacktracking::ClearIncomingSequences()
{
    sequences.clear();
}

void CMBacktracking::AddLatencyToNetchan(INetChannel* netchan, float Latency)
{
    for (auto& seq : sequences)
    {
        if (interfaces.global_vars->realtime - seq.curtime >= Latency || interfaces.global_vars->realtime - seq.curtime > 1 || interfaces.global_vars->realtime < seq.curtime)
        {
            netchan->iInReliableState = seq.inreliablestate;
            netchan->iInSequenceNr = seq.sequencenr;
            break;
        }
    }
}

void CMBacktracking::DoPingSpike(INetChannel* net_channel)
{
    if (!csgo->local || !csgo->local->isAlive())
        return;

    if (!csgo->disable_dt || CanDT())
        return;

    auto ping_value = 0.2f;
    INetChannelInfo* nci = interfaces.engine->GetNetChannelInfo();
    if (nci)
    {
        ping_value += nci->GetLatency(FLOW_OUTGOING);
        ping_value -= nci->GetLatency(FLOW_OUTGOING);
    }
    static auto oldseqnum = 0;

    if (oldseqnum == net_channel->iInSequenceNr)
        return;

    oldseqnum = net_channel->iInSequenceNr;

    net_channel->iInSequenceNr += 126 - static_cast<uint32_t>(63 * (ping_value));
}



C++:
#pragma once
#include <deque>
struct Point
{
    Vector vecPoint;
    int iHitbox;
};
struct tick_record
{
    Vector m_vecOrigin, m_vecAbsOrigin, m_vecRenderAngles;
    Vector headpos;
    bool bLowerBodyYawUpdated;
    float m_flLowerBodyYaw;
    bool bFakelagging;
    float m_flSimulationTime;
    float m_flAnimTime;
    int m_nSequence;
    Vector m_angEyeAngles, m_absAngles;
    string resolver;
    float m_flUpdateTime;
    Vector m_vecVelocity;
    float backtrack_time;
    float m_flCycle;
    float m_flWeight;
    int m_nFlags;
    CAnimationLayer AnimLayers[15];
    matrix boneMatrix[128];
    std::vector<Point> Points;
    CCSGOPlayerAnimState* animstate;
    float pose_params[24];
    Vector m_vecMins;
    Vector m_vecMax;

};
struct lby_record
{
    float simtime;
    Vector headpos; 
};
struct CIncomingSequence
{
    CIncomingSequence(int instate22, int outstate22, int seqnr22, float ctime22)
    {
        inreliablestate = instate22;
        outreliablestate = outstate22;
        sequencenr = seqnr22;
        curtime = ctime22;
    }
    int inreliablestate;
    int outreliablestate;
    int sequencenr;
    float curtime;
};

struct ResolverInfo
{
    std::string resolvermode = "unknown";
    float backtrack_time = -1.f;
    float next_lby_update;
};

class CMBacktracking
{
public:
    void UpdateIncomingSequences();
    void ClearIncomingSequences();
    void AddLatencyToNetchan(INetChannel* netchan, float Latency);
    void DoPingSpike(INetChannel* net_channel);
private:
};

extern CMBacktracking* g_Backtrack;
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
10 Дек 2018
Сообщения
308
Реакции[?]
28
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ok
Начинающий
Статус
Оффлайн
Регистрация
18 Фев 2020
Сообщения
132
Реакции[?]
20
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
4 Сен 2018
Сообщения
20
Реакции[?]
6
Поинты[?]
0
for a start,
Код:
CMBacktracking* g_Backtrack = new CMBacktracking();
please empty the heap after use, this is a terrible habit to do, (to do that when g_backtrack is no longer important just do: delete g_Backtrack; alternatively be normal and dont use the heap, thats the best choice
 
Забаненный
Статус
Оффлайн
Регистрация
22 Июн 2021
Сообщения
25
Реакции[?]
2
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу