mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-10 04:40:10 +07:00
Fixed #4685
This commit is contained in:
parent
7a21c02476
commit
af39d6a6ee
@ -119,6 +119,9 @@ public class LogicAI extends AIController{
|
|||||||
|
|
||||||
vec.set(target).sub(unit);
|
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);
|
float length = circleLength <= 0.001f ? 1f : Mathf.clamp((unit.dst(target) - circleLength) / smooth, -1f, 1f);
|
||||||
|
|
||||||
vec.setLength(unit.realSpeed() * length);
|
vec.setLength(unit.realSpeed() * length);
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=40c4e9db40cb8fbe7daa091f20ca0bf5acfd8484
|
archash=baaa8652a41304abff81995aaf90f6589461ec0c
|
||||||
|
Loading…
Reference in New Issue
Block a user