still works

This commit is contained in:
nullifiedcat 2017-07-29 12:09:07 +03:00
parent 71d5ce2f80
commit 224cb81287
2 changed files with 6 additions and 0 deletions

View File

@ -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*)Shutdown_hook, offsets::Shutdown());
hooks::netchannel.Apply();
#if IPC_ENABLED
ipc::UpdateServerAddress();
#endif
}
/**bSendPackets = true;

View File

@ -228,6 +228,9 @@ bool SendNetMsg_hook(void* _this, INetMessage& msg, bool bForceReliable = false,
void Shutdown_hook(void* _this, const char* reason) {
// This is a INetChannel hook - it SHOULDN'T be static because netchannel changes.
const Shutdown_t original = (Shutdown_t)hooks::netchannel.GetMethod(offsets::Shutdown());
#if IPC_ENABLED
ipc::UpdateServerAddress(true);
#endif
SEGV_BEGIN;
if (cathook && (disconnect_reason.convar_parent->m_StringLength > 3) && strstr(reason, "user")) {
original(_this, disconnect_reason_newlined);