From 4a53204965489d24725631ce4997c596c9205a21 Mon Sep 17 00:00:00 2001 From: navewindre Date: Tue, 11 Sep 2018 00:27:00 +0200 Subject: a --- internal_rewrite/extra.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'internal_rewrite/extra.cpp') diff --git a/internal_rewrite/extra.cpp b/internal_rewrite/extra.cpp index fa0882a..fb8564a 100644 --- a/internal_rewrite/extra.cpp +++ b/internal_rewrite/extra.cpp @@ -109,26 +109,6 @@ namespace features g_settings.misc.net_fakeping_active = false; break; } - - static bool enabled = false; - auto clientstate = g_csgo.m_global_state->get_client_state( ); - if( clientstate && !enabled ) { - // TODO: Change this to the non-homosexual way of hooking CNetChan functions. - // Actually, I'm too lazy. You can do this if you want. - /* - auto *base_net_channel = *memory::find_signature< uint32_t ** >( g_cl.m_engine.dll( ), "C7 07 ? ? ? ? E8 ? ? ? ? 83 BF", 2 ); - - VirtualProtect( &base_net_channel [ 46 ], 4, PAGE_EXECUTE_READWRITE, &o_prot ); - hooked::o_send_datagram = ( decltype( hooked::o_send_datagram ) ) base_net_channel [ 46 ]; - base_net_channel [ 46 ] = uint32_t( hooked::send_datagram ); - VirtualProtect( &base_net_channel [ 46 ], 4, o_prot, &o_prot ); - */ - auto netchannel = clientstate->m_netchannel; - if( netchannel ) { - hooks::send_datagram_o = memory::detours.create_hook( &hooks::send_datagram, g_csgo.m_net_channel->get_old_function< void* >( 46 ) ); - enabled = true; - } - } } void c_extra::add_latency( INetChannel* channel ) { -- cgit v1.2.3