Fixed ghost enemies and jerky movement at low FPS values

This commit is contained in:
Anuken
2018-02-11 17:07:05 -05:00
parent b0f26a0cf4
commit 4311e57dd7
4 changed files with 12 additions and 5 deletions
@@ -294,8 +294,8 @@ public class Player extends SyncEntity{
Interpolator i = interpolator;
float tx = x + Angles.trnsx(angle + 180f, 3f);
float ty = y + Angles.trnsy(angle + 180f, 3f);
float tx = x + Angles.trnsx(angle + 180f, 4f);
float ty = y + Angles.trnsy(angle + 180f, 4f);
if(isAndroid && i.target.dst(i.last) > 2f && timer.get(timerDash, 1)){
Effects.effect(Fx.dashsmoke, tx, ty);
@@ -120,7 +120,7 @@ public abstract class SyncEntity extends DestructibleEntity{
public void update(){
time += 1f / spacing * Timers.delta();
time += 1f / spacing * Math.min(Timers.delta(), 1f);
Mathf.lerp2(pos.set(last), target, time);