SteamWar/BauSystem2.0
Archiviert
12
0

Merge pull request 'Fixed laufbau first tnt bug' (#246) from fix-laufbau into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #246
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
YoyoNow 2024-05-01 13:44:46 +02:00
Commit daedbb26a7
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -90,11 +90,10 @@ public class ProcessingTracesState implements LaufbauState {
Location location = current.getLocation();
if (current.getPrevious().isPresent()) {
Vector velocity = current.getPrevious().get().getVelocity();
Location previousLocation = current.getPrevious().get().getLocation();
Location movement = location.clone().subtract(previousLocation);
calculateCuboid(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 (velocity.getX() >= velocity.getZ()) {
if (movement.getX() >= movement.getZ()) {
calculateCuboid(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));
calculateCuboid(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 {

Datei anzeigen

@ -219,6 +219,9 @@ public class TNTPoint implements Externalizable {
public boolean equals(Object obj) {
if (!(obj instanceof TNTPoint)) return false;
TNTPoint record = (TNTPoint) obj;
if (record.getTntId() != tntId) return false;
if (record.getFuse() != fuse) return false;
if (record.getTicksSinceStart() != ticksSinceStart) return false;
if (record.isExplosion() != explosion) return false;
if (!record.getLocation().equals(location)) return false;
if (!record.getVelocity().equals(velocity)) return false;