Lowkey trolled with my last fix, here's a LOT more of a proper fix. I'm sure there's additional things that can be improved upon etc, this was ideally just for anyone who's trying to paste anything together off default Supremacy.
FrameStageNotify:
// easy to implement
// have to figure out how to hook, only thing I left out.
Address frame_stage_notify = pattern::find( m_client_dll, XOR( "55 8B EC 8B 0D ? ? ? ? 8B 01 8B 80 ? ? ? FF D0 A2" ) );
// this goes in clientdll.h
enum Stage_t {
FRAME_UNDEFINED = -1,
FRAME_START,
FRAME_NET_UPDATE_START,
FRAME_NET_UPDATE_POSTDATAUPDATE_START,
FRAME_NET_UPDATE_POSTDATAUPDATE_END,
FRAME_NET_UPDATE_END,
FRAME_RENDER_START,
FRAME_RENDER_END,
FRAME_NET_FULL_FRAME_UPDATE_ON_REMOVE
};
void __fastcall FrameStageNotify( void* ecx, void* edx, Stage_t stage ) {
if ( ( stage == FRAME_NET_FULL_FRAME_UPDATE_ON_REMOVE ) || ( stage == FRAME_UNDEFINED ) || ( stage == FRAME_START ) )
return;
// save stage.
g_cl.m_stage = stage;
// Get localplayer.
g_cl.m_local = g_csgo.m_entlist->GetClientEntity< Player* >( g_csgo.m_engine->GetLocalPlayer() );
if( stage == FRAME_RENDER_START )
{
// apply local player animated angles.
g_cl.SetAngles( );
// draw our custom beams.
g_visuals.DrawBeams( );
}
// call og.
g_hooks.m_client.GetOldMethod< FrameStageNotify_t >( CHLClient::FRAMESTAGENOTIFY )( this, stage );
if (stage == FRAME_RENDER_START) {
}
if ( stage == FRAME_NET_UPDATE_START )
{
// start tracking prediction errors.
g_csgo.m_game_movement->StartTrackPredictionErrors( g_cl.m_local );
}
if( stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START ) {
// update incomings sequences.
g_cl.UpdateIncomingSequences( );
// run our skinchanger
g_skins.think();
}
if( stage == FRAME_NET_UPDATE_POSTDATAUPDATE_END ) {
// run smoke removal
g_visuals.NoSmoke( );
// restore non-compressed netvars.
g_netdata.apply();
// apply local player animation fix.
g_cl.UpdateAnimations( );
// 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->m_bIsLocalPlayer( ) )
continue;
AimPlayer* data = &g_aimbot.m_players[ i - 1 ];
data->OnNetUpdate( player );
}
}
if( stage == FRAME_NET_UPDATE_END ) {
// stop tracking prediction errors.
g_csgo.m_game_movement->FinishTrackPredictionErrors( g_cl.m_local );
}
}
Последнее редактирование: