blob: c4d8c388a745d387a66a74c54e9bbe0202e49250 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "hooks.hpp"
#include "chams.hpp"
#include "base_cheat.hpp"
void __fastcall hooks::level_init_pre_entity( void* ecx_, void* edx_, const char* map_name ) {
static auto original_fn = g_csgo.m_chl->get_old_function< decltype( &level_init_pre_entity ) >( 5 );
bool has_level_initialized = **( bool** )( ( uintptr_t )original_fn + 8 );
// obviously source engine is perfect
// "HACK: Bogus, but the logic is too complicated in the engine"
if( !has_level_initialized ) {
//g_cheat.m_chams.m_materials.initialize_materials( );
}
return original_fn( ecx_, edx_, map_name );
}
|