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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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