diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java index 0243462c..4e388500 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java @@ -63,7 +63,7 @@ public class ProcessingTracesState implements LaufbauState { } else { Vector movement = location.clone().subtract(previousLocation); cuboidList.add(new Cuboid(previousLocation.getX() - 0.49, Math.min(previousLocation.getY(), location.getY()), previousLocation.getZ() - 0.49, 0.98, Math.abs(movement.getY()) + 0.98, 0.98)); - if (Math.abs(tntPosition.getVelocity().getX()) >= Math.abs(tntPosition.getVelocity().getZ())) { + if (Math.abs(tntPosition.getFirstVelocity().getX()) >= Math.abs(tntPosition.getFirstVelocity().getZ())) { cuboidList.add(new Cuboid(Math.min(previousLocation.getX(), location.getX()) - 0.49, location.getY(), previousLocation.getZ() - 0.49, Math.abs(movement.getX()) + 0.98, 0.98, 0.98)); cuboidList.add(new Cuboid(location.getX() - 0.49, location.getY(), Math.min(previousLocation.getZ(), location.getZ()) - 0.49, 0.98, 0.98, Math.abs(movement.getZ()) + 0.98)); } else { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java index 561a6c1a..52de4f6c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java @@ -32,14 +32,16 @@ public class TNTPosition extends Position { private final int fuseTicks; private final Vector previousLocation; private final Vector velocity; + private final Vector firstVelocity; private final boolean exploded; - public TNTPosition(Record.TNTRecord record, TNTPrimed entity, Vector previousLocation, Vector velocity, boolean exploded) { + public TNTPosition(Record.TNTRecord record, TNTPrimed entity, Vector previousLocation, Vector velocity, Vector firstVelocity, boolean exploded) { super(entity.getLocation().toVector()); this.record = record; this.fuseTicks = entity.getFuseTicks(); this.previousLocation = previousLocation; this.velocity = velocity; + this.firstVelocity = firstVelocity; this.exploded = exploded; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/Record.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/Record.java index f43e2993..b2a876be 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/Record.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/Record.java @@ -98,9 +98,9 @@ public class Record { private void add(TNTPrimed tntPrimed, boolean exploded) { TNTPosition position; if (positions.isEmpty()) { - position = new TNTPosition(this, tntPrimed, null, tntPrimed.getVelocity(), exploded); + position = new TNTPosition(this, tntPrimed, null, tntPrimed.getVelocity(), null, exploded); } else { - position = new TNTPosition(this, tntPrimed, positions.get(positions.size() - 1).getLocation(), tntPrimed.getVelocity(), exploded); + position = new TNTPosition(this, tntPrimed, positions.get(positions.size() - 1).getLocation(), tntPrimed.getVelocity(), positions.get(0).getVelocity(), exploded); } positions.add(position); TraceShowManager.show(position); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/mode/FactoredEntityShowMode.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/mode/FactoredEntityShowMode.java index 08dacd46..24fc2fa1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/mode/FactoredEntityShowMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/mode/FactoredEntityShowMode.java @@ -109,7 +109,7 @@ public abstract class FactoredEntityShowMode implements ShowMode { } if (showModeParameter.isInterpolate_XZ()) { - Vector updatePointXZ = Math.abs(position.getVelocity().getX()) >= Math.abs(position.getVelocity().getZ()) + Vector updatePointXZ = Math.abs(position.getFirstVelocity().getX()) >= Math.abs(position.getFirstVelocity().getZ()) ? position.getLocation().clone().setZ(position.getPreviousLocation().getZ()) : position.getLocation().clone().setX(position.getPreviousLocation().getX()); if (!position.getLocation().equals(updatePointXZ)) {