forked from CSGOLeaks/supremacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclientstate.cpp
39 lines (29 loc) · 889 Bytes
/
clientstate.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "includes.h"
bool Hooks::TempEntities( void *msg ) {
if( !g_cl.m_processing ) {
return g_hooks.m_client_state.GetOldMethod< TempEntities_t >( CClientState::TEMPENTITIES )( this, msg );
}
const bool ret = g_hooks.m_client_state.GetOldMethod< TempEntities_t >( CClientState::TEMPENTITIES )( this, msg );
CEventInfo *ei = g_csgo.m_cl->m_events;
CEventInfo *next = nullptr;
if( !ei ) {
return ret;
}
do {
next = *reinterpret_cast< CEventInfo ** >( reinterpret_cast< uintptr_t >( ei ) + 0x38 );
uint16_t classID = ei->m_class_id - 1;
auto m_pCreateEventFn = ei->m_client_class->m_pCreateEvent;
if( !m_pCreateEventFn ) {
continue;
}
void *pCE = m_pCreateEventFn( );
if( !pCE ) {
continue;
}
if( classID == 170 ){
ei->m_fire_delay = 0.0f;
}
ei = next;
} while( next != nullptr );
return ret;
}