forked from 0ad/0ad
Prevent players from rejoining that were not present on game start. Patch by elexis. Fixes #3305.
This was SVN commit r16792.
This commit is contained in:
parent
9701a85554
commit
c6ca83949c
@ -1044,6 +1044,14 @@ void CNetServerWorker::StartGame()
|
||||
|
||||
// Send the final setup state to all clients
|
||||
UpdateGameAttributes(&m_GameAttributes.get());
|
||||
|
||||
// Remove players and observers that are not present when the game starts
|
||||
for (PlayerAssignmentMap::iterator it = m_PlayerAssignments.begin(); it != m_PlayerAssignments.end();)
|
||||
if (it->second.m_Enabled)
|
||||
++it;
|
||||
else
|
||||
it = m_PlayerAssignments.erase(it);
|
||||
|
||||
SendPlayerAssignments();
|
||||
|
||||
CGameStartMessage gameStart;
|
||||
|
Loading…
Reference in New Issue
Block a user