Merge pull request 'fix(tracer): Fixed first point of advanced flag incorrect calc order' (#254) from fix-tracer-advanced-flag-first-tick-calc into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #254
Dieser Commit ist enthalten in:
Commit
593113bbc3
@ -34,6 +34,9 @@ import java.util.stream.Stream;
|
|||||||
* A settable flag that changes how a trace is rendered
|
* A settable flag that changes how a trace is rendered
|
||||||
*/
|
*/
|
||||||
public abstract class ViewFlag {
|
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
|
* Static registry of static flags
|
||||||
*/
|
*/
|
||||||
@ -122,9 +125,8 @@ public abstract class ViewFlag {
|
|||||||
if (prev.isEmpty()) continue;
|
if (prev.isEmpty()) continue;
|
||||||
|
|
||||||
TNTPoint previous = prev.get();
|
TNTPoint previous = prev.get();
|
||||||
Vector previousVelocity = previous.getVelocity();
|
|
||||||
|
|
||||||
Location delta = representative.getLocation().clone().subtract(previous.getLocation());
|
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);
|
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) {
|
if (yLocation.distanceSquared(representative.getLocation()) >= 1.0 / 256.0 && yLocation.distanceSquared(previous.getLocation()) >= 1.0 / 256.0) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren