diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java index 088aee4e..9aa83f13 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/ViewFlag.java @@ -34,6 +34,9 @@ import java.util.stream.Stream; * A settable flag that changes how a trace is rendered */ public abstract class ViewFlag { + public static final Vector GRAVATY = new Vector(0.0, -0.04, 0.0); + public static final Vector DRAG_FACTOR = new Vector(0.98, 0.98, 0.98); + /** * Static registry of static flags */ @@ -122,9 +125,8 @@ public abstract class ViewFlag { if (prev.isEmpty()) continue; TNTPoint previous = prev.get(); - Vector previousVelocity = previous.getVelocity(); - Location delta = representative.getLocation().clone().subtract(previous.getLocation()); + Vector previousVelocity = previous.isAfterFirstExplosion() ? previous.getVelocity() : delta.toVector().clone().divide(DRAG_FACTOR).subtract(GRAVATY); Location yLocation = previous.getLocation().clone().add(0, delta.getY(), 0); if (yLocation.distanceSquared(representative.getLocation()) >= 1.0 / 256.0 && yLocation.distanceSquared(previous.getLocation()) >= 1.0 / 256.0) {