Ticket #3305: t3305_clear_player_assignments_when_starting_the_game_v2.patch
File t3305_clear_player_assignments_when_starting_the_game_v2.patch, 733 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(auto it = m_PlayerAssignments.begin(), ite = m_PlayerAssignments.end(); it != ite;) 1050 { 1051 if (it->second.m_Enabled) 1052 ++it; 1053 else 1054 it = m_PlayerAssignments.erase(it); 1055 } 1056 1047 1057 SendPlayerAssignments(); 1048 1058 1049 1059 CGameStartMessage gameStart; 1050 1060 Broadcast(&gameStart); 1051 1061 }