summaryrefslogtreecommitdiff
path: root/internal_rewrite/hooks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'internal_rewrite/hooks.cpp')
-rw-r--r--internal_rewrite/hooks.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal_rewrite/hooks.cpp b/internal_rewrite/hooks.cpp
index cc0cd44..94d2cdb 100644
--- a/internal_rewrite/hooks.cpp
+++ b/internal_rewrite/hooks.cpp
@@ -1,6 +1,7 @@
#include "hooks.hpp"
#include "interface.hpp"
#include "detours.h"
+#include "wipe.hpp"
//god i'm so cool
namespace hooks {
@@ -38,6 +39,8 @@ hooks::c_netvar_proxy hooks::last_shot_proxy;
hooks::c_netvar_proxy hooks::simtime_proxy;
bool hooks::commit( factory::c_csgo* instance ) {
+ DELETE_START( 5 );
+
while ( !( instance->m_hwnd = FindWindowA( xors( "Valve001" ), 0 ) ) )
Sleep( 100 );
@@ -86,7 +89,15 @@ bool hooks::commit( factory::c_csgo* instance ) {
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 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 );
+
d->enable( );
return true;
+
+ DELETE_END( 5 );
}