#4487 but properly implemented

This commit is contained in:
Anuken
2021-01-31 19:44:29 -05:00
parent 919012608a
commit 2b17dbe390
2 changed files with 4 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
package mindustry.entities.comp;
import arc.math.*;
import arc.math.geom.*;
import arc.util.*;
import mindustry.annotations.Annotations.*;
@@ -22,7 +21,7 @@ abstract class VelComp implements Posc{
@Override
public void update(){
move(vel.x * Time.delta, vel.y * Time.delta);
vel.scl(Mathf.clamp(1f - drag * Time.delta));
vel.scl(Math.max(1f - drag * Time.delta, 0));
}
/** @return function to use for check solid state. if null, no checking is done. */