Ticket #3242: t3242_clear_player_assignments_when_starting_the_game.patch
File t3242_clear_player_assignments_when_starting_the_game.patch, 846 bytes (added by , 9 years ago) |
---|
-
source/network/NetServer.cpp
1042 1042 1043 1043 m_State = SERVER_STATE_LOADING; 1044 1044 1045 1045 // Send the final setup state to all clients 1046 1046 UpdateGameAttributes(&m_GameAttributes.get()); 1047 1048 // Remove players and observers from the assignment that are not present when the game starts 1049 for (size_t i = 0; i < m_Sessions.size(); ++i) 1050 for (PlayerAssignmentMap::iterator it = m_PlayerAssignments.begin(); it != m_PlayerAssignments.end(); ++it) 1051 if (!it->second.m_Enabled) 1052 { 1053 m_PlayerAssignments.erase(it); 1054 break; 1055 } 1056 1047 1057 SendPlayerAssignments(); 1048 1058 1049 1059 CGameStartMessage gameStart; 1050 1060 Broadcast(&gameStart); 1051 1061 }