spectators can no longer move and attack with units after selecting them (#7062)

* less power for spectators

* better formatting
This commit is contained in:
alexban011
2022-06-06 09:32:02 +03:00
committed by GitHub
parent 7ae54aceb1
commit 6c990b67e2

View File

@ -216,6 +216,9 @@ class WorldMapHolder(
} }
private fun onTileRightClicked(unit: MapUnit, tile: TileInfo) { private fun onTileRightClicked(unit: MapUnit, tile: TileInfo) {
if (UncivGame.Current.gameInfo.currentPlayerCiv.isSpectator()) {
return
}
removeUnitActionOverlay() removeUnitActionOverlay()
selectedTile = tile selectedTile = tile
unitMovementPaths.clear() unitMovementPaths.clear()