2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-28 15:45:46 +03:00

SV_ConnectClient: Move function Steam_NotifyClientDisconnect

This commit is contained in:
s1lent 2020-01-29 01:20:58 +07:00
parent e7232be7e1
commit c4cecf5f12
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -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