Skip to content

Commit e02038d

Browse files
committed
Fixed crashing bug from trying to move the the enemy unit instead of to the place to attack from
1 parent a34e131 commit e02038d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ android {
2121
applicationId "com.unciv.app"
2222
minSdkVersion 14
2323
targetSdkVersion 29
24-
versionCode 354
25-
versionName "3.4.5"
24+
versionCode 355
25+
versionName "3.4.5-patch1"
2626

2727
archivesBaseName = "Unciv"
2828
}

core/src/com/unciv/logic/automation/UnitAutomation.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ class UnitAutomation{
273273
val closestEnemy = closeEnemies.minBy { it.tileToAttack.arialDistanceTo(unit.getTile()) }
274274

275275
if (closestEnemy != null) {
276-
unit.movement.headTowards(closestEnemy.tileToAttack)
276+
unit.movement.headTowards(closestEnemy.tileToAttackFrom)
277277
return true
278278
}
279279
return false

0 commit comments

Comments
 (0)