From 224cb8128774c8aae7c2828491ee88e5c3b37826 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Sat, 29 Jul 2017 12:09:07 +0300 Subject: [PATCH] still works --- src/hooks/CreateMove.cpp | 3 +++ src/hooks/others.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/hooks/CreateMove.cpp b/src/hooks/CreateMove.cpp index ee6885b1..7ae2c67f 100644 --- a/src/hooks/CreateMove.cpp +++ b/src/hooks/CreateMove.cpp @@ -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; diff --git a/src/hooks/others.cpp b/src/hooks/others.cpp index a3c92174..d6755906 100644 --- a/src/hooks/others.cpp +++ b/src/hooks/others.cpp @@ -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);