summaryrefslogtreecommitdiff
path: root/internal_rewrite/is_hltv.cpp
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2018-09-09 18:28:04 +0200
committernavewindre <boneyaard@gmail.com>2018-09-09 18:28:04 +0200
commit215818ddedc02be3a1a5c2be3912abdbcd29dd72 (patch)
tree16453999d9380f43a6f436e491e63aa58ac7e764 /internal_rewrite/is_hltv.cpp
parent620f39df29fed446ab007e03c7b071f635379f1f (diff)
detours etc
Diffstat (limited to 'internal_rewrite/is_hltv.cpp')
-rw-r--r--internal_rewrite/is_hltv.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/internal_rewrite/is_hltv.cpp b/internal_rewrite/is_hltv.cpp
deleted file mode 100644
index 60b24f8..0000000
--- a/internal_rewrite/is_hltv.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "hooks.hpp"
-#include "pattern.hpp"
-#include "mem.hpp"
-
-bool __fastcall hooks::is_hltv( void* ecx, uintptr_t pvs_ent ) {
- static auto is_hltv_o = g_csgo.m_engine->get_old_function< decltype( &hooks::is_hltv ) >( 93 );
- static auto pvs_retaddr = pattern::first_code_match( g_csgo.m_chl.dll( ), xors( "84 C0 0F 85 ? ? ? ? A1 ? ? ? ? 8B B7" ) );
-
- if ( !g_csgo.m_panic && pvs_retaddr ) {
- stack_t stack( get_baseptr( ) );
- auto return_address = stack.return_address( );
-
- if ( return_address == pvs_retaddr ) {
- if ( pvs_ent && reinterpret_cast< c_base_player* >( pvs_ent )->is_valid( ) ) {
- *( int* )( pvs_ent + 0xa24 ) = -1;
- *( int* )( pvs_ent + 0xa2c ) = *( int* )( pvs_ent + 0xa28 );
- *( int* )( pvs_ent + 0xa28 ) = 0;
- return true;
- }
- }
- }
-
- return is_hltv_o( ecx, pvs_ent );
-}
-
-bool __declspec( naked ) __fastcall hooks::is_hltv_proxy( void*, void* ) {
- __asm {
- mov edx, edi;
- jmp is_hltv;
- }
-} \ No newline at end of file