Fixed bug where game would crash if the currently selected unit was destroyed

This commit is contained in:
Yair Morgenstern 2018-04-12 21:58:38 +03:00
parent 34c1047b65
commit 532dc75c34

View File

@ -72,13 +72,15 @@ class WorldScreen : CameraStageBaseScreen() {
updateTechButton()
if (tileMapHolder.selectedTile != null)
tileInfoTable.updateTileTable(tileMapHolder.selectedTile!!)
unitTable.update() // has to come before tilemapholder update because the tilemapholder actions depend on the selected unit!
tileMapHolder.updateTiles()
civTable.update(this)
notificationsScroll.update()
notificationsScroll.width = stage.width/3
notificationsScroll.setPosition(stage.width - notificationsScroll.width - 5f,
nextTurnButton.y - notificationsScroll.height - 5f)
unitTable.update()
battleTable.update()
}