diff --git a/android/build.gradle b/android/build.gradle index 88c131dda6..65065cca60 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -30,6 +30,7 @@ dependencies{ natives "com.github.Anuken.Arc:natives-android:${getArcHash()}" natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}" + natives "com.github.Anuken.Arc:natives-box2d-android:${getArcHash()}" } task deploy(type: Copy){ diff --git a/build.gradle b/build.gradle index 69f6563717..e3122bbc32 100644 --- a/build.gradle +++ b/build.gradle @@ -206,6 +206,7 @@ project(":ios"){ compile arcModule("natives:natives-ios") compile arcModule("natives:natives-freetype-ios") + compile arcModule("natives:natives-box2d-ios") compile arcModule("backends:backend-robovm") compileOnly project(":annotations") diff --git a/core/src/mindustry/entities/units/AIController.java b/core/src/mindustry/entities/units/AIController.java index 75ff20cd21..5b610dd388 100644 --- a/core/src/mindustry/entities/units/AIController.java +++ b/core/src/mindustry/entities/units/AIController.java @@ -3,6 +3,7 @@ package mindustry.entities.units; import arc.math.*; import arc.math.geom.*; import arc.util.*; +import mindustry.entities.*; import mindustry.gen.*; import mindustry.world.*; import mindustry.world.meta.*; @@ -36,10 +37,11 @@ public class AIController implements UnitController{ } protected void targetClosest(){ - //Teamc newTarget = Units.closestTarget(unit.team(), unit.x(), unit.y(), Math.max(unit.range(), unit.type().range), u -> (unit.type().targetAir && u.isFlying()) || (unit.type().targetGround && !u.isFlying())); - //if(newTarget != null){ - // target = newTarget; - //} + //TODO optimize! + Teamc newTarget = Units.closestTarget(unit.team(), unit.x(), unit.y(), Math.max(unit.range(), unit.type().range), u -> (unit.type().targetAir && u.isFlying()) || (unit.type().targetGround && !u.isFlying())); + if(newTarget != null){ + target = newTarget; + } } @Override diff --git a/gradle.properties b/gradle.properties index 5ea44d9c93..9f399d22d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=9fc6cd8c90e0665cc3a583879b2007fe29fbc929 +archash=a6056fa47248251552aacd365648030f4f6dd3a4 diff --git a/settings.gradle b/settings.gradle index 23b7d0d11c..5cec16025f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -49,7 +49,7 @@ if(!hasProperty("release")){ ':Arc:natives:natives-freetype-ios', ':Arc:natives:natives-box2d-desktop', ':Arc:natives:natives-box2d-android', - //':Arc:natives:natives-box2d-ios', TODO + ':Arc:natives:natives-box2d-ios', ':Arc:backends', ':Arc:backends:backend-sdl', ':Arc:backends:backend-android',