From 3817b159cf2e32ca5955dcde0c8acacbda8c0772 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 26 Jun 2021 00:19:23 -0400 Subject: [PATCH] Reduced jittery interpolation --- .../src/main/java/mindustry/annotations/entity/EntityIO.java | 3 ++- core/src/mindustry/async/PhysicsProcess.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/annotations/src/main/java/mindustry/annotations/entity/EntityIO.java b/annotations/src/main/java/mindustry/annotations/entity/EntityIO.java index b42369c94d..b4a05b1294 100644 --- a/annotations/src/main/java/mindustry/annotations/entity/EntityIO.java +++ b/annotations/src/main/java/mindustry/annotations/entity/EntityIO.java @@ -143,7 +143,8 @@ public class EntityIO{ if(sl) cont("if(!islocal)"); if(sf){ - st(field.name + lastSuf + " = this." + field.name + targetSuf); + //TODO adding + targetSuf to the assignment fixes units being interpolated incorrectly during physics, but makes interpolation snap instead. + st(field.name + lastSuf + " = this." + field.name); } io(field.type, "this." + (sf ? field.name + targetSuf : field.name) + " = "); diff --git a/core/src/mindustry/async/PhysicsProcess.java b/core/src/mindustry/async/PhysicsProcess.java index 9ad2064a7a..a7b17a5ffc 100644 --- a/core/src/mindustry/async/PhysicsProcess.java +++ b/core/src/mindustry/async/PhysicsProcess.java @@ -60,8 +60,8 @@ public class PhysicsProcess implements AsyncProcess{ ref.body.layer = entity.type.allowLegStep ? layerLegs : entity.isGrounded() ? layerGround : layerFlying; - ref.x = entity.x(); - ref.y = entity.y(); + ref.x = entity.x; + ref.y = entity.y; } }