This commit is contained in:
Anuken
2020-08-20 18:37:15 -04:00
parent c946b42360
commit 52489ef777
8 changed files with 35 additions and 13 deletions
@@ -1,5 +1,6 @@
package mindustry.entities.comp;
import arc.math.*;
import arc.math.geom.*;
import arc.util.*;
import mindustry.annotations.Annotations.*;
@@ -18,7 +19,7 @@ abstract class VelComp implements Posc{
@Override
public void update(){
move(vel.x * Time.delta, vel.y * Time.delta);
vel.scl(1f - drag * Time.delta);
vel.scl(Mathf.clamp(1f - drag * Time.delta));
}
boolean moving(){