SteamWar/BauSystem2.0
Archiviert
12
0

Merge pull request 'fix(tracer): Fixed wrong velocity taken in advanced flag' (#253) from fix-direction-decision-in-advanced-flag into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #253
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
YoyoNow 2024-07-04 17:17:15 +02:00
Commit 442ba6f483

Datei anzeigen

@ -119,10 +119,10 @@ public abstract class ViewFlag {
for (TraceEntity entity : entities) {
TNTPoint representative = entity.getRecords().get(0);
Optional<TNTPoint> prev = representative.getPrevious();
if (prev.isEmpty()) continue;
TNTPoint previous = prev.get();
Vector previousVelocity = previous.getVelocity();
Location delta = representative.getLocation().clone().subtract(previous.getLocation());
@ -133,7 +133,7 @@ public abstract class ViewFlag {
}
Location secoundLocation;
if (delta.getX() >= delta.getZ()) {
if (previousVelocity.getX() >= previousVelocity.getZ()) {
secoundLocation = previous.getLocation().clone().add(delta.getX(), delta.getY(), 0);
} else {
secoundLocation = previous.getLocation().clone().add(0, delta.getY(), delta.getZ());