From 3d412a4b30a9f7c7f51ea6562e694315948bd3da Mon Sep 17 00:00:00 2001 From: boris Date: Wed, 28 Nov 2018 16:00:02 +1300 Subject: cleaned up in short, the cheat and loader are now separate solutions. unused stuff was moved into the legacy solution in case anyone wants to compile it or whatever. i can change this back if you want to. also, i configured the loader to compile in x64, and have separate build types for linux and win64 --- cheat/internal_rewrite/paint_traverse.cpp | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 cheat/internal_rewrite/paint_traverse.cpp (limited to 'cheat/internal_rewrite/paint_traverse.cpp') diff --git a/cheat/internal_rewrite/paint_traverse.cpp b/cheat/internal_rewrite/paint_traverse.cpp new file mode 100644 index 0000000..8376cdd --- /dev/null +++ b/cheat/internal_rewrite/paint_traverse.cpp @@ -0,0 +1,65 @@ +#include "hooks.hpp" +#include "renderer.hpp" +#include "context.hpp" +#include "console.hpp" +#include "base_cheat.hpp" +#include "math.hpp" +#include "settings.hpp" + +void __fastcall hooks::paint_traverse( void* ecx_, void* edx_, unsigned int panel, bool force_repaint, bool allowforce ) { + if( g_csgo.m_panic ) return paint_traverse_o( ecx_, 0, panel, force_repaint, allowforce ); + if( ecx_ != g_csgo.m_panel.get( ) ) + return paint_traverse_o( ecx_, 0, panel, force_repaint, allowforce ); + + g_csgo.m_main_thread = std::this_thread::get_id( ); + + if( g_settings.legit.enabled ) { + g_settings.rage.enabled( ) = false; + } + + static uint32_t mat_system_top_panel{ }; + if( !mat_system_top_panel ) { + auto panel_name = g_csgo.m_panel( )->GetName( panel ); + auto panel_hash = hash::fnv1a( panel_name ); + if( fnv( "MatSystemTopPanel" ) == panel_hash ) { + mat_system_top_panel = panel; + } + } + + static uint32_t hud_zoom{ }; + if( !hud_zoom ) { + auto panel_name = g_csgo.m_panel( )->GetName( panel ); + auto panel_hash = hash::fnv1a( panel_name ); + if( fnv( "HudZoom" ) == panel_hash ) { + hud_zoom = panel; + } + } + + if( panel && panel == hud_zoom && g_settings.misc.no_scope + && g_ctx.m_local && g_ctx.m_local->is_valid( ) ) { + return; + } + + if( panel && panel == mat_system_top_panel ) { + //render your epic 2008 hake esp here + g_renderer.draw_box( 0, 0, 1, 1, clr_t( 0, 0, 0, 1 ) ); + //g_renderer.draw_string( g_fonts.f_12, 100, 200, clr_t( 255, 255, 255, 255 ), "c: %d", g_csgo.m_global_state->get_client_state( )->m_chokedcommands ); + if( !g_settings.misc.hide_from_obs ) + g_cheat.m_visuals( ); + + /*auto nci = g_csgo.m_engine( )->GetNetChannelInfo( ); + if( nci ) { + float desired_in_latency = g_settings.misc.net_fakeping_amount * 0.001f; + float latency = nci->GetLatency( 1 ); + + float delta = latency - desired_in_latency; + + g_renderer.draw_string( g_fonts.f_12, 20, 400, clr_t( 255, 255, 255 ), "latency: %f", latency ); + //g_renderer.draw_string( g_fonts.f_12, 20, ) + g_renderer.draw_string( g_fonts.f_12, 20, 410, clr_t( 255, 255, 255 ), "delta: %f", delta ); + }*/ + } + + g_csgo.m_prediction( )->SetLocalViewAngles( g_ctx.m_last_fakeangle ); + return paint_traverse_o( ecx_, 0, panel, force_repaint, allowforce ); +} \ No newline at end of file -- cgit v1.2.3