From c4cecf5f1285393dfd78219de332e02e52a5422d Mon Sep 17 00:00:00 2001 From: s1lent Date: Wed, 29 Jan 2020 01:20:58 +0700 Subject: [PATCH] SV_ConnectClient: Move function Steam_NotifyClientDisconnect --- rehlds/engine/sv_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index d05ae65..15922ee 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -2325,10 +2325,19 @@ void EXT_FUNC SV_ConnectClient_internal(void) if (reconnect) { +#ifndef REHLDS_FIXES Steam_NotifyClientDisconnect(client); +#endif + if ((client->active || client->spawned) && client->edict) gEntityInterface.pfnClientDisconnect(client->edict); +#ifdef REHLDS_FIXES + // FIXED: Call after pfnClientDisconnect + // because 3rd-party may expects that useful data (eg steamid) hasn't reset yet + Steam_NotifyClientDisconnect(client); +#endif + Con_Printf("%s:reconnect\n", NET_AdrToString(adr)); } else