Fixed can't press nextTurn in multiplayer game (#3748)

* Fixed game crashes on create multiplayer game

* Update isPlayersTurn on update()
This commit is contained in:
GGGuenni 2021-03-30 17:14:07 +02:00 committed by GitHub
parent cb50732ec4
commit 5d6bfbfb31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -148,7 +148,7 @@ class NewGameScreen(previousScreen:CameraStageBaseScreen, _gameSetupInfo: GameSe
// Save gameId to clipboard because you have to do it anyway.
Gdx.app.clipboard.contents = newGame!!.gameId
// Popup to notify the User that the gameID got copied to the clipboard
Gdx.app.postRunnable { ToastPopup("gameID copied to clipboard".tr(), UncivGame.Current.worldScreen, 2500) }
Gdx.app.postRunnable { ToastPopup("gameID copied to clipboard".tr(), game.worldScreen, 2500) }
GameSaver.autoSave(newGame!!) {}

View File

@ -312,6 +312,7 @@ class WorldScreen(val gameInfo: GameInfo, val viewingCiv:CivilizationInfo) : Cam
techPolicyAndVictoryHolder.setPosition(10f, topBar.y - techPolicyAndVictoryHolder.height - 5f)
updateDiplomacyButton(viewingCiv)
isPlayersTurn = viewingCiv == gameInfo.currentPlayerCiv
if (!hasOpenPopups() && isPlayersTurn) {
when {