Do not call InitializePlayers after script player join if no human players joined

alut-include-path
Sven Eberhardt 2017-02-19 19:06:40 -05:00
parent 76b9d68126
commit 69b0fd4f1a
1 changed files with 2 additions and 2 deletions

View File

@ -3083,8 +3083,8 @@ C4Player *C4Game::JoinPlayer(const char *szFilename, int32_t iAtClient, const ch
void C4Game::OnPlayerJoinFinished()
{
// Do the InitializePlayers callback once all player joins have finished
if (!InitialPlayersJoined && !PlayerInfos.GetJoinPendingPlayerCount() && !::Players.HasPlayerInTeamSelection())
// Do the InitializePlayers callback once all player joins have finished with at least one human player
if (!InitialPlayersJoined && !PlayerInfos.GetJoinPendingPlayerCount() && !::Players.HasPlayerInTeamSelection() && (::Players.GetCount(C4PT_User) > 0))
{
InitialPlayersJoined = true;
GRBroadcast(PSF_InitializePlayers);