diff --git a/core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerScreen.kt b/core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerScreen.kt index edb86a98d0..dd4033e48c 100644 --- a/core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerScreen.kt +++ b/core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerScreen.kt @@ -399,11 +399,14 @@ class MultiplayerScreen : PickerScreen() { } else { val durationInactive = Duration.between(Instant.ofEpochMilli(preview.currentTurnStartTime), Instant.now()) forceResignButton.isVisible = - preview.getPlayerCiv(game.settings.multiplayer.userId)?.civName == Constants.spectator - || durationInactive > Duration.ofDays(2) + game.settings.multiplayer.userId in preview.civilizations.map { it.playerId } && + preview.getPlayerCiv(game.settings.multiplayer.userId)?.civName == Constants.spectator + || durationInactive > Duration.ofDays(2) } - skipTurnButton.isVisible = preview != null && preview.gameParameters.minutesUntilSkipTurn <= - (Duration.between(Instant.ofEpochMilli(preview.currentTurnStartTime), Instant.now()).toMinutes()) + skipTurnButton.isVisible = preview != null + && game.settings.multiplayer.userId in preview.civilizations.map { it.playerId } + && preview.gameParameters.minutesUntilSkipTurn <= + Duration.between(Instant.ofEpochMilli(preview.currentTurnStartTime), Instant.now()).toMinutes() rightSideButton.enable()