1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-21 21:38:29 +03:00
This commit is contained in:
Anuken 2021-02-15 10:37:24 -05:00
parent 7a21c02476
commit af39d6a6ee
2 changed files with 4 additions and 1 deletions

View File

@ -119,6 +119,9 @@ public class LogicAI extends AIController{
vec.set(target).sub(unit);
//do not move when infinite vectors are used.
if(vec.isNaN() || vec.isInfinite()) return;
float length = circleLength <= 0.001f ? 1f : Mathf.clamp((unit.dst(target) - circleLength) / smooth, -1f, 1f);
vec.setLength(unit.realSpeed() * length);

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=40c4e9db40cb8fbe7daa091f20ca0bf5acfd8484
archash=baaa8652a41304abff81995aaf90f6589461ec0c