Better low-FPS predict

This commit is contained in:
Anuken
2019-03-11 14:33:39 -04:00
parent 9e6745f691
commit 4909c28ed9
2 changed files with 4 additions and 1 deletions

View File

@@ -255,4 +255,4 @@ public class MapEditor{
}
renderer.resize(width, height);
}
}
}

View File

@@ -2,6 +2,7 @@ package io.anuke.mindustry.entities;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.math.geom.Vector2;
import io.anuke.arc.util.Time;
import io.anuke.mindustry.entities.traits.TargetTrait;
/**
@@ -24,6 +25,8 @@ public class Predict{
* @return the intercept location
*/
public static Vector2 intercept(float srcx, float srcy, float dstx, float dsty, float dstvx, float dstvy, float v){
dstvx /= Time.delta();
dstvy /= Time.delta();
float tx = dstx - srcx,
ty = dsty - srcy;