From bb8b13b512d1b9bbe8f78cb8d64eba5479fbd540 Mon Sep 17 00:00:00 2001 From: boris Date: Fri, 7 Dec 2018 11:42:40 +1300 Subject: eeeeeeeeeeeeee --- cheat/internal_rewrite/IVEngineClient.hpp | 2 +- cheat/internal_rewrite/c_base_weapon.hpp | 2 +- cheat/internal_rewrite/hooks.cpp | 8 ++-- cheat/internal_rewrite/process_packet.cpp | 62 +++++++++++++++---------------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/cheat/internal_rewrite/IVEngineClient.hpp b/cheat/internal_rewrite/IVEngineClient.hpp index fb39e08..01f519d 100644 --- a/cheat/internal_rewrite/IVEngineClient.hpp +++ b/cheat/internal_rewrite/IVEngineClient.hpp @@ -187,7 +187,7 @@ public: void GetActiveSounds( CUtlVector< CSndInfo >& list ) { using fn = void( __thiscall* )( void*, CUtlVector< CSndInfo >& ); - return util::get_vfunc< fn >( this, 18 )( this, list ); + return util::get_vfunc< fn >( this, 19 )( this, list ); } }; diff --git a/cheat/internal_rewrite/c_base_weapon.hpp b/cheat/internal_rewrite/c_base_weapon.hpp index f8c1b1c..97f40d6 100644 --- a/cheat/internal_rewrite/c_base_weapon.hpp +++ b/cheat/internal_rewrite/c_base_weapon.hpp @@ -211,7 +211,7 @@ public: } __forceinline weapon_info_t* get_wpn_info( ) { - return util::get_vfunc< 444, weapon_info_t* >( this ); + return util::get_vfunc< 443, weapon_info_t* >( this ); } __forceinline void update_accuracy_penalty( ) { diff --git a/cheat/internal_rewrite/hooks.cpp b/cheat/internal_rewrite/hooks.cpp index d6e598c..b272896 100644 --- a/cheat/internal_rewrite/hooks.cpp +++ b/cheat/internal_rewrite/hooks.cpp @@ -91,20 +91,20 @@ bool hooks::commit( factory::c_csgo* instance ) { play_sound_o = d->create_hook( &hooks::play_sound, instance->m_surface->get_old_function< void* >( 82 ) ); material_system_o = d->create_hook( &hooks::material_system, instance->m_mat_system->get_old_function< void* >( 21 ) ); suppress_lists_o = d->create_hook( &hooks::suppress_lists, instance->m_partition->get_old_function< void* >( 16 ) ); - draw_small_entities_o = d->create_hook( &hooks::draw_small_entities, instance->m_clientleaf->get_old_function< void* >( 39 ) ); + //draw_small_entities_o = d->create_hook( &hooks::draw_small_entities, instance->m_clientleaf->get_old_function< void* >( 39 ) ); simulate_o = d->create_hook( &hooks::simulate, instance->m_engine_vgui->get_old_function< void* >( 39 ) ); begin_lock_o = d->create_hook( &hooks::begin_lock, instance->m_mdl_cache->get_old_function< void* >( 33 ) ); end_lock_o = d->create_hook( &hooks::end_lock, instance->m_mdl_cache->get_old_function< void* >( 34 ) ); auto packet_start = pattern::first_code_match< void* >( instance->m_engine.dll( ), xors( "55 8B EC 8B 45 08 89 81 ? ? ? ? 8B 45 0C 89 81 ? ? ? ? 5D C2 08 00 ? ? ? ? ? ? ? 56" ) ); packet_start_o = d->create_hook( &hooks::packet_start, packet_start ); - + auto process_packet = pattern::first_code_match< void * >(instance->m_engine.dll(), xors("55 8B EC 83 E4 C0 81 EC ? ? ? ? 53 56 57 8B 7D 08 8B D9")); process_packet_o = d->create_hook(&hooks::process_packet, process_packet); - + auto update_clientside_anim = pattern::first_code_match< void* >( instance->m_chl.dll( ), xors( "55 8B EC 51 56 8B F1 80 BE ? ? ? ? ? 74 36" ) ); update_clientside_animation_o = d->create_hook( &hooks::update_clientside_animation, update_clientside_anim ); - + auto send_datagram = pattern::first_code_match< void* >( instance->m_engine.dll( ), xors( "55 8B EC 83 E4 F0 B8 ? ? ? ? E8 ? ? ? ? 56 57 8B F9 89 7C 24 18" ) ); send_datagram_o = d->create_hook( &hooks::send_datagram, send_datagram ); diff --git a/cheat/internal_rewrite/process_packet.cpp b/cheat/internal_rewrite/process_packet.cpp index ee321a7..9f7e021 100644 --- a/cheat/internal_rewrite/process_packet.cpp +++ b/cheat/internal_rewrite/process_packet.cpp @@ -3,37 +3,37 @@ bool __fastcall hooks::process_packet(void *ecx, void *, void *packet, bool has_header) { bool result = process_packet_o(ecx, nullptr, packet, has_header); - auto *cl = g_csgo.m_global_state->get_client_state(); - - if (!g_csgo.m_engine()->IsInGame() || !cl) - return result; - - // new events could be coming in - uint32_t v3 = *(uint32_t*)cl + 19948; - - if (!v3) - return result; - - for (; !!v3; ) { - float &v8 = *(float *)((uint32_t)v3 + 4); - - if (v8 > 0.0f) - v8 = 0.0f; - - uint32_t v11 = *(uint32_t *)((uint32_t)v3 + 56); - v3 = v11; - } - - //printf("yea\n"); - - // CL_FireEvents will make sure the events are triggered instantly - // i honestly can't wait for you to call me a retard for this :DDDDDDDDDDDDD - // 55 8B EC 83 EC 08 53 8B 1D ? ? ? ? 56 57 83 BB ? ? ? ? ? 74 12 8D 8B ? ? ? ? E8 - static auto fire_events = pattern::first_code_match< void(*)() >( - g_csgo.m_engine.dll(), - xors("55 8B EC 83 EC 08 53 8B 1D ? ? ? ? 56 57 83 BB ? ? ? ? ? 74 12 8D 8B ? ? ? ? E8") - ); - fire_events(); + //auto *cl = g_csgo.m_global_state->get_client_state(); + // + //if (!g_csgo.m_engine()->IsInGame() || !cl) + // return result; + // + //// new events could be coming in + //uint32_t v3 = *(uint32_t*)cl + 19948; + // + //if (!v3) + // return result; + // + //for (; !!v3; ) { + // float &v8 = *(float *)((uint32_t)v3 + 4); + // + // if (v8 > 0.0f) + // v8 = 0.0f; + // + // uint32_t v11 = *(uint32_t *)((uint32_t)v3 + 56); + // v3 = v11; + //} + // + ////printf("yea\n"); + // + //// CL_FireEvents will make sure the events are triggered instantly + //// i honestly can't wait for you to call me a retard for this :DDDDDDDDDDDDD + //// 55 8B EC 83 EC 08 53 8B 1D ? ? ? ? 56 57 83 BB ? ? ? ? ? 74 12 8D 8B ? ? ? ? E8 + //static auto fire_events = pattern::first_code_match< void(*)() >( + // g_csgo.m_engine.dll(), + // xors("55 8B EC 83 EC 08 53 8B 1D ? ? ? ? 56 57 83 BB ? ? ? ? ? 74 12 8D 8B ? ? ? ? E8") + //); + //fire_events(); return result; } \ No newline at end of file -- cgit v1.2.3