mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Fixed unit icons not getting deleted when unit exits tile
This commit is contained in:
parent
0952a6a5a6
commit
101fa9903e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user