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 be47e4bc..21a05357 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TNTPosition.java @@ -36,10 +36,10 @@ public class TNTPosition extends Position { private final boolean source; private final boolean exploded; - public TNTPosition(Record.TNTRecord record, TNTPrimed entity, Vector previousLocation, Vector velocity, Vector updateVelocity, boolean source, boolean exploded) { - super(entity.getLocation().toVector()); + public TNTPosition(Record.TNTRecord record, Vector position, int fuseTicks, Vector previousLocation, Vector velocity, Vector updateVelocity, boolean source, boolean exploded) { + super(position); this.record = record; - this.fuseTicks = entity.getFuseTicks(); + this.fuseTicks = fuseTicks; this.previousLocation = previousLocation; this.velocity = velocity; this.updateVelocity = updateVelocity; 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 8314b640..ca7f7156 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 @@ -103,26 +103,26 @@ public class Record { } public void source(TNTPrimed tntPrimed) { - add(tntPrimed, true, false); + add(tntPrimed.getLocation().toVector(), tntPrimed.getVelocity(), tntPrimed.getFuseTicks(), true, false); } public void location(TNTPrimed tntPrimed) { - add(tntPrimed, false, false); + add(tntPrimed.getLocation().toVector(), tntPrimed.getVelocity(), tntPrimed.getFuseTicks(), false, false); } public void explode(TNTPrimed tntPrimed) { - add(tntPrimed, false, true); + add(tntPrimed.getLocation().toVector(), tntPrimed.getVelocity(), tntPrimed.getFuseTicks(), false, true); record.checkMicroMotion(); } - private void add(TNTPrimed tntPrimed, boolean source, boolean exploded) { + private void add(Vector location, Vector velocity, int fuseTicks, boolean source, boolean exploded) { TNTPosition position; if (positions.isEmpty()) { - position = new TNTPosition(this, tntPrimed, null, tntPrimed.getVelocity(), null, source, exploded); + position = new TNTPosition(this, location, fuseTicks, null, velocity, null, source, exploded); } else { TNTPosition tntPosition = positions.get(positions.size() - 1); - Vector lastVelocity = tntPrimed.getLocation().toVector().clone().subtract(tntPosition.getLocation()); - position = new TNTPosition(this, tntPrimed, positions.get(positions.size() - 1).getLocation(), tntPrimed.getVelocity(), lastVelocity, source, exploded); + Vector lastVelocity = location.clone().subtract(tntPosition.getLocation()); + position = new TNTPosition(this, location, fuseTicks, positions.get(positions.size() - 1).getLocation(), velocity, lastVelocity, source, exploded); } positions.add(position); TraceShowManager.show(region, position);