mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +07:00
Fixed unit icons not getting deleted when unit exits tile
This commit is contained in:
@ -53,6 +53,7 @@ class TileGroupIcons(val tileGroup: TileGroup){
|
||||
fun newUnitIcon(unit: MapUnit?, oldUnitGroup: UnitGroup?, isViewable: Boolean, yFromCenter: Float, viewingCiv: CivilizationInfo?): UnitGroup? {
|
||||
var newImage: UnitGroup? = null
|
||||
// The unit can change within one update - for instance, when attacking, the attacker replaces the defender!
|
||||
oldUnitGroup?.unitBaseImage?.remove()
|
||||
oldUnitGroup?.remove()
|
||||
|
||||
if (unit != null && isViewable) { // Tile is visible
|
||||
|
Reference in New Issue
Block a user