still works
This commit is contained in:
parent
71d5ce2f80
commit
224cb81287
@ -148,6 +148,9 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
|||||||
hooks::netchannel.HookMethod((void*)SendNetMsg_hook, offsets::SendNetMsg());
|
hooks::netchannel.HookMethod((void*)SendNetMsg_hook, offsets::SendNetMsg());
|
||||||
hooks::netchannel.HookMethod((void*)Shutdown_hook, offsets::Shutdown());
|
hooks::netchannel.HookMethod((void*)Shutdown_hook, offsets::Shutdown());
|
||||||
hooks::netchannel.Apply();
|
hooks::netchannel.Apply();
|
||||||
|
#if IPC_ENABLED
|
||||||
|
ipc::UpdateServerAddress();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**bSendPackets = true;
|
/**bSendPackets = true;
|
||||||
|
@ -228,6 +228,9 @@ bool SendNetMsg_hook(void* _this, INetMessage& msg, bool bForceReliable = false,
|
|||||||
void Shutdown_hook(void* _this, const char* reason) {
|
void Shutdown_hook(void* _this, const char* reason) {
|
||||||
// This is a INetChannel hook - it SHOULDN'T be static because netchannel changes.
|
// This is a INetChannel hook - it SHOULDN'T be static because netchannel changes.
|
||||||
const Shutdown_t original = (Shutdown_t)hooks::netchannel.GetMethod(offsets::Shutdown());
|
const Shutdown_t original = (Shutdown_t)hooks::netchannel.GetMethod(offsets::Shutdown());
|
||||||
|
#if IPC_ENABLED
|
||||||
|
ipc::UpdateServerAddress(true);
|
||||||
|
#endif
|
||||||
SEGV_BEGIN;
|
SEGV_BEGIN;
|
||||||
if (cathook && (disconnect_reason.convar_parent->m_StringLength > 3) && strstr(reason, "user")) {
|
if (cathook && (disconnect_reason.convar_parent->m_StringLength > 3) && strstr(reason, "user")) {
|
||||||
original(_this, disconnect_reason_newlined);
|
original(_this, disconnect_reason_newlined);
|
||||||
|
Reference in New Issue
Block a user