SteamWar/BauSystem2.0
Archiviert
12
0

Commits vergleichen

..

2 Commits

Autor SHA1 Nachricht Datum
D4rkr34lm
4d9aacfc3e Merge remote-tracking branch 'origin/TracerGUI' into TracerGUI
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
2024-04-18 17:13:00 +02:00
D4rkr34lm
6a3f3f8b0a fixed filters
Signed-off-by: D4rkr34lm <darth.m.frohn@gmail.com>
2024-04-18 17:12:53 +02:00

Datei anzeigen

@ -29,16 +29,16 @@ public enum BundleFilter {
LOOSE((TNTPoint a, TNTPoint b) -> {
if (a.isExplosion() != b.isExplosion()) return false;
if (a.getLocation().distanceSquared(b.getLocation()) <= BundleFilter.pixelSizeSquared * 8) return false;
if (a.getVelocity().distanceSquared(b.getVelocity()) <= BundleFilter.pixelSizeSquared * 8) return false;
if (a.getLocation().distanceSquared(b.getLocation()) > BundleFilter.pixelSizeSquared * 8) return false;
if (a.getVelocity().distanceSquared(b.getVelocity()) > BundleFilter.pixelSizeSquared * 8) return false;
return true;
}),
DEFAULT((TNTPoint a, TNTPoint b) -> {
if (a.isExplosion() != b.isExplosion()) return false;
if (a.getTicksSinceStart() != b.getTicksSinceStart()) return null;
if (a.getLocation().distanceSquared(b.getLocation()) <= BundleFilter.pixelSizeSquared) return false;
if (a.getVelocity().distanceSquared(b.getVelocity()) <= BundleFilter.pixelSizeSquared) return false;
if (a.getLocation().distanceSquared(b.getLocation()) > BundleFilter.pixelSizeSquared) return false;
if (a.getVelocity().distanceSquared(b.getVelocity()) > BundleFilter.pixelSizeSquared) return false;
return true;
}),