class CClientState {
public:
void ForceFullUpdate() {
*reinterpret_cast<int*>(std::uintptr_t(this) + 0x174) = -1;
}
char pad_0000[156]; //0x0000
void* m_NetChannel; //0x009C
uint32_t m_nChallengeNr; //0x00A0
char pad_00A4[100]; //0x00A4
uint32_t m_nSignonState; //0x0108
char pad_010C[8]; //0x010C
float m_flNextCmdTime; //0x0114
uint32_t m_nServerCount; //0x0118
uint32_t m_nCurrentSequence; //0x011C
char pad_0120[8]; //0x0120
void* m_ClockDriftMgr; //0x0128
uint32_t m_nDeltaTick; //0x0174
bool m_bPaused; //0x0178
char pad_017D[3]; //0x017D
uint32_t m_nViewEntity; //0x0180
uint32_t m_nPlayerSlot; //0x0184
char m_szLevelName[260]; //0x0188
char m_szLevelNameShort[80]; //0x028C
char m_szGroupName[80]; //0x02DC
char pad_032С[92]; //0x032С
uint32_t m_nMaxClients; //0x0388
char pad_0314[18824]; //0x0314
float m_flLastServerTickTime; //0x4C98
bool insimulation; //0x4C9C
char pad_4C9D[3]; //0x4C9D
uint32_t oldtickcount; //0x4CA0
float m_tickRemainder; //0x4CA4
float m_frameTime; //0x4CA8
int lastoutgoingcommand; //0x4CAC
int chokedcommands; //0x4CB0
int last_command_ack; //0x4CB4
int command_ack; //0x4CB8
int m_nSoundSequence; //0x4CBC
char pad_4CC0[80]; //0x4CC0
math::vec3_t viewangles; //0x4D10
char pad_4D1C[208]; //0x4D1C
};
try_set(client_state, **mem::find_ida_sig("engine.dll","A1 ? ? ? ? 8B 80 ? ? ? ? C3").self_offset(1).cast<CClientState***>());
static bool __fastcall send_net_msg(void* pNetChan, void* edx, INetMessage* msg, bool bForceReliable, bool bVoice);
CREATE_HOOK(ctx::csgo.client_state->m_NetChannel, 40, send_net_msg);
bool __fastcall hook_handler_t::send_net_msg(void* pNetChan, void* edx, INetMessage* msg, bool bForceReliable, bool bVoice)
{
if (msg->GetType() == 14)// Return and don't send messsage if its FileCRCCheck
return false;
return hooks::get().orig_send_net_msg(pNetChan, edx, msg, bForceReliable, bVoice);
}