diff options
| author | navewindre <boneyaard@gmail.com> | 2018-09-01 14:23:02 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-09-01 14:23:02 +0200 |
| commit | beb5515757c0e653adc33f181184fe3791ca0a6b (patch) | |
| tree | 68f123f602795a31a8811bd56e3b3271c102a3fa /internal_rewrite/simulate.cpp | |
| parent | 0767d6d4acaf5f86a67a375dffa54da9323646e3 (diff) | |
dasdadasf
Diffstat (limited to 'internal_rewrite/simulate.cpp')
| -rw-r--r-- | internal_rewrite/simulate.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal_rewrite/simulate.cpp b/internal_rewrite/simulate.cpp index 2e47483..798f98f 100644 --- a/internal_rewrite/simulate.cpp +++ b/internal_rewrite/simulate.cpp @@ -7,7 +7,12 @@ void __fastcall hooks::simulate( void* ecx, void* edx ) {
static auto simulate_o = g_csgo.m_engine_vgui->get_old_function< decltype( &hooks::simulate ) >( 39 );
+#ifdef HEADER_MODULE
+ static auto ret_addr = g_header.patterns.simulate_retaddr - 0x81;
+#else
static auto ret_addr = pattern::first_code_match< void* >( g_csgo.m_engine.dll( ), "8B CE 6A FF 8B 06", -0x81 );
+#endif
+
if( _ReturnAddress( ) == ret_addr ) {
g_ctx.m_stage = FRAME_RENDER_START;
g_cheat.m_visuals.world_modulate( );
@@ -28,8 +33,12 @@ void __fastcall hooks::simulate( void* ecx, void* edx ) { g_cheat.m_extra.no_smoke( );
if( g_settings.misc.no_smoke ) {
+#ifdef HEADER_MODULE
+ static auto smoke_count = g_header.patterns.smoke_count;
+#else
static auto smoke_count = pattern::first_code_match( g_csgo.m_chl.dll( ),
xors( "55 8B EC 83 EC 08 8B 15 ? ? ? ? 0F 57 C0" ) );
+#endif
**reinterpret_cast< int** >( smoke_count + 0x8 ) = 0;
}
|
