fix edge case

This commit is contained in:
BotoX 2021-05-16 17:02:52 +02:00
parent d5e88b6f39
commit 22ebbdf95e

View File

@ -200,7 +200,10 @@ void SourceGameContext::UserInfoChanged(int tableIdx, int entryIdx)
if (entry.data.size() != sizeof(player_info_t)) if (entry.data.size() != sizeof(player_info_t))
{ {
if(players[client].connected) if(players[client].connected)
{
logic->OnClientDisconnected(client, "");
userIdLookUp[players[client].info.userID] = 0xFF; userIdLookUp[players[client].info.userID] = 0xFF;
}
memset(&players[client].info, 0, sizeof(player_info_t)); memset(&players[client].info, 0, sizeof(player_info_t));
players[client].connected = false; players[client].connected = false;