Исходник Supremacy FSN Fix

Начинающий
Статус
Оффлайн
Регистрация
22 Сен 2018
Сообщения
26
Реакции[?]
5
Поинты[?]
3K
Frame Stage Notify is not really correct by default, while this is an improvement it still can be done better/proper implementation of ragebot functionality to properly update pertick etc but this is a good start, this would go in ClientDLL.


FrameStageNotify:
void Hooks::FrameStageNotify(Stage_t stage)
{
    // save stage.
    if ( stage != FRAME_START )
        g_cl.m_stage = stage;

    // save our localplayer.
    g_cl.m_local = g_csgo.m_entlist->GetClientEntity< Player* >( g_csgo.m_engine->GetLocalPlayer() );

    switch (stage)
    {
    case FRAME_RENDER_START:
    {
        // apply local player animated angles.
        g_cl.SetAngles();

        // apply local player animation fix.
        g_cl.UpdateAnimations();

        // draw our custom beams.
        g_visuals.DrawBeams();
    }
    break;

    case FRAME_NET_UPDATE_POSTDATAUPDATE_START:
    {

    }
    break;

    case FRAME_NET_UPDATE_POSTDATAUPDATE_END:
    {
        // restore non-compressed netvars.
        g_netdata.apply();

        // run smoke removal.
        g_visuals.NoSmoke();
    }
    break;

    case FRAME_NET_UPDATE_END:
    {
        const bool v9 = g_csgo.m_engine->IsPlayingDemo( );
        const bool v10 = g_csgo.m_engine->IsPaused( );

        if (!v9 && !v10)
        {
            for (CEventInfo* it{ g_csgo.m_cl->m_events }; it != nullptr; it = it->m_next) {
                if (!it->m_class_id)
                    continue;

                // set all delays to instant.
                it->m_fire_delay = 0.f;
            }

            // game events are actually fired in OnRenderStart which is WAY later after they are received
            // effective delay by lerp time, now we call them right after theyre received (all receive proxies are invoked without delay).
            g_csgo.m_engine->FireEvents();
        }

        // update all players.
        for (int i{ 1 }; i <= g_csgo.m_globals->m_max_clients; ++i)
        {
            Player* player = g_csgo.m_entlist->GetClientEntity< Player* >(i);
        
            if (!player || !player->alive( ) || player->m_bIsLocalPlayer( ) )
                continue;

            AimPlayer* data = &g_aimbot.m_players[i - 1];
            
            data->OnNetUpdate( player );
        }
    }
    break;
    }

    // call og.
    g_hooks.m_client.GetOldMethod< FrameStageNotify_t >(CHLClient::FRAMESTAGENOTIFY)(this, stage);
}
 
Сверху Снизу