mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 15:01:09 -04:00
Resolved #596 - unit retains focus when moved to tile with another unit already in it, if it has movement points left
This commit is contained in:
parent
00ef4d171c
commit
5c4be33418
@ -142,6 +142,9 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap:
|
|||||||
Sounds.play("whoosh")
|
Sounds.play("whoosh")
|
||||||
if (dto.unit.currentTile != dto.tileInfo)
|
if (dto.unit.currentTile != dto.tileInfo)
|
||||||
dto.unit.action = "moveTo " + dto.tileInfo.position.x.toInt() + "," + dto.tileInfo.position.y.toInt()
|
dto.unit.action = "moveTo " + dto.tileInfo.position.x.toInt() + "," + dto.tileInfo.position.y.toInt()
|
||||||
|
if(dto.unit.currentMovement>0){
|
||||||
|
worldScreen.bottomBar.unitTable.selectedUnit=dto.unit
|
||||||
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user