diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index f609de8676..5725b045f2 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -120,7 +120,7 @@ class GameInfo { } /** Get a civ by name - * @throws NoSuchElementException if no civ of than name is in the game (alive or dead)! */ + * @throws NoSuchElementException if no civ of that name is in the game (alive or dead)! */ fun getCivilization(civName: String) = civilizations.first { it.civName == civName } fun getCurrentPlayerCivilization() = currentPlayerCiv fun getCivilizationsAsPreviews() = civilizations.map { it.asPreview() }.toMutableList() diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index bbc4552f8f..1cceb955b5 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -335,7 +335,12 @@ class WorldScreen(val gameInfo: GameInfo, val viewingCiv:CivilizationInfo) : Bas val latestGame = OnlineMultiplayer().tryDownloadGame(gameInfo.gameId) // if we find the current player didn't change, don't update - if (gameInfo.currentPlayer == latestGame.currentPlayer) { + // Additionally, check if we are the current player, and in that case always stop + // This fixes a bug where for some reason players were waiting for themselves. + if (gameInfo.currentPlayer == latestGame.currentPlayer + && gameInfo.turns == latestGame.turns + && latestGame.currentPlayer != gameInfo.getPlayerToViewAs().civName + ) { Gdx.app.postRunnable { loadingGamePopup.close() } shouldUpdate = true return