Resolved #12611 - AI can move air units with "Cannot move" unique

This commit is contained in:
yairm210 2024-12-08 10:43:37 +02:00
parent e143c76d63
commit 43f8ba47a4

View File

@ -584,6 +584,8 @@ class UnitMovement(val unit: MapUnit) {
* Leave it as default unless you know what [canMoveTo] does.
*/
fun canMoveTo(tile: Tile, assumeCanPassThrough: Boolean = false, allowSwap: Boolean = false, includeOtherEscortUnit: Boolean = true): Boolean {
if (unit.cache.cannotMove) return false
if (unit.baseUnit.movesLikeAirUnits)
return canAirUnitMoveTo(tile, unit)