summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2018-12-07 14:18:45 +1300
committerboris <wzn@moneybot.cc>2018-12-07 14:18:45 +1300
commit430f93006fb8ac7c37c8cfc984d3d02b9f7dc693 (patch)
treefaabb436330b1d55e48449874e8fb03ac60f3b7c
parentbb8b13b512d1b9bbe8f78cb8d64eba5479fbd540 (diff)
broke the cheat even more :DDDDDDDDD
-rw-r--r--cheat/internal_rewrite/c_base_player.cpp11
-rw-r--r--cheat/internal_rewrite/c_base_player.hpp8
-rw-r--r--cheat/internal_rewrite/hooks.cpp40
3 files changed, 32 insertions, 27 deletions
diff --git a/cheat/internal_rewrite/c_base_player.cpp b/cheat/internal_rewrite/c_base_player.cpp
index 3ace4ab..981f63b 100644
--- a/cheat/internal_rewrite/c_base_player.cpp
+++ b/cheat/internal_rewrite/c_base_player.cpp
@@ -211,6 +211,17 @@ void c_base_player::invalidate_physics_recursive( int flags ) {
fn( this, flags );
}
}
+
+void c_base_player::update_clientside_animation() {
+ bool backup = m_bClientSideAnimation();
+ m_bClientSideAnimation() = true;
+
+ using fn = void(__fastcall*)(void*);
+ pattern::first_code_match<fn>(g_csgo.m_chl.dll(), xors("55 8B EC 51 56 8B F1 80 BE ? ? ? ? ? 74 36"))(this);
+
+ m_bClientSideAnimation() = backup;
+}
+
uintptr_t c_base_player::get_player_resource( ) {
for( int i{ 1 }; i < g_csgo.m_entlist( )->GetHighestEntityIndex( ); ++i ) {
diff --git a/cheat/internal_rewrite/c_base_player.hpp b/cheat/internal_rewrite/c_base_player.hpp
index 30bafde..78c84ac 100644
--- a/cheat/internal_rewrite/c_base_player.hpp
+++ b/cheat/internal_rewrite/c_base_player.hpp
@@ -399,13 +399,7 @@ public:
return *reinterpret_cast< CCSGOPlayerAnimState** >( uintptr_t( this ) + offset - 0xa );
}
- __forceinline void update_clientside_animation( ) {
- bool backup = m_bClientSideAnimation( );
- m_bClientSideAnimation( ) = true;
- util::get_vfunc< 218, void >( this );
- m_bClientSideAnimation( ) = backup;
- }
-
+ void update_clientside_animation();
void invalidate_bone_cache( );
__forceinline vec3_t get_eye_pos( ) {
diff --git a/cheat/internal_rewrite/hooks.cpp b/cheat/internal_rewrite/hooks.cpp
index b272896..812a46d 100644
--- a/cheat/internal_rewrite/hooks.cpp
+++ b/cheat/internal_rewrite/hooks.cpp
@@ -71,8 +71,8 @@ bool hooks::commit( factory::c_csgo* instance ) {
instance->m_netshowfragments->hook( 13, &hooks::net_showfragments_get_int );
instance->m_csm_shadows->hook( 13, &hooks::cl_csm_shadows_get_int );
- paint_traverse_o = d->create_hook( &hooks::paint_traverse, instance->m_panel->get_old_function< void* >( 41 ) );
- create_move_o = d->create_hook( &hooks::create_move, instance->m_clientmode->get_old_function< void* >( 24 ) );
+ //paint_traverse_o = d->create_hook( &hooks::paint_traverse, instance->m_panel->get_old_function< void* >( 41 ) );
+ //create_move_o = d->create_hook( &hooks::create_move, instance->m_clientmode->get_old_function< void* >( 24 ) );
override_mouse_input_o = d->create_hook( &hooks::override_mouse_input, instance->m_clientmode->get_old_function< void* >( 23 ) );
get_viewmodel_fov_o = d->create_hook( &hooks::get_viewmodel_fov, instance->m_clientmode->get_old_function< void* >( 35 ) );
do_post_screen_space_effects_o = d->create_hook( &hooks::do_post_screen_space_effects, instance->m_clientmode->get_old_function< void* >( 44 ) );
@@ -80,31 +80,31 @@ bool hooks::commit( factory::c_csgo* instance ) {
lock_cursor_o = d->create_hook( &hooks::lock_cursor, instance->m_surface->get_old_function< void* >( 67 ) );
run_command_o = d->create_hook( &hooks::run_command, instance->m_prediction->get_old_function< void* >( 19 ) );
in_prediction_o = d->create_hook( &hooks::in_prediction, instance->m_prediction->get_old_function< void* >( 14 ) );
- draw_model_execute_o = d->create_hook( &hooks::draw_model_execute, instance->m_model_render->get_old_function< void* >( 21 ) );
- scene_end_o = d->create_hook( &hooks::scene_end, instance->m_render_view->get_old_function< void* >( 9 ) );
- get_screen_size_o = d->create_hook( &hooks::get_screen_size, instance->m_surface->get_old_function< void* >( 44 ) );
-
- // this has annoyed me for so long
- emit_sound_o = d->create_hook(&hooks::emit_sound, instance->m_engine_sound->get_old_function< void * >(5));
-
+ //draw_model_execute_o = d->create_hook( &hooks::draw_model_execute, instance->m_model_render->get_old_function< void* >( 21 ) );
+ //scene_end_o = d->create_hook( &hooks::scene_end, instance->m_render_view->get_old_function< void* >( 9 ) );
+ //get_screen_size_o = d->create_hook( &hooks::get_screen_size, instance->m_surface->get_old_function< void* >( 44 ) );
+ //
+ //// this has annoyed me for so long
+ //emit_sound_o = d->create_hook(&hooks::emit_sound, instance->m_engine_sound->get_old_function< void * >(5));
+ //
on_screen_size_changed_o = d->create_hook( &hooks::on_screen_size_changed, instance->m_surface->get_old_function< void* >( 116 ) );
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 ) );
- 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 ) );
-
+ //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 ) );
+ //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 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 );