Skip to content
Permalink
Browse files

Add bounds check for userid reset on disconnect (#1108)

  • Loading branch information
Headline committed Oct 31, 2019
1 parent e433dbf commit 8c380e45daa5d29cd40350f990d175298bfbd4bf
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/PlayerManager.cpp
@@ -1474,7 +1474,10 @@ void PlayerManager::InvalidatePlayer(CPlayer *pPlayer)
}
}

m_UserIdLookUp[engine->GetPlayerUserId(pPlayer->m_pEdict)] = 0;
auto userid = engine->GetPlayerUserId(pPlayer->m_pEdict);
if (userid != -1)
m_UserIdLookUp[userid] = 0;

pPlayer->Disconnect();
}

0 comments on commit 8c380e4

Please sign in to comment.
You can’t perform that action at this time.