Permalink
Browse files
Add bounds check for userid reset on disconnect (#1108)
- Loading branch information
Showing
with
4 additions
and
1 deletion.
-
+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