Bugfix: cap lightning distance (#12659)

This commit is contained in:
EggleEgg
2026-09-15 06:03:44 +02:00
committed by GitHub
parent ca9876544e
commit 42ec5c9685

View File

@@ -84,7 +84,7 @@ public class Lightning{
Unit furthest = Geometry.findFurthest(x, y, entities);
if(furthest != null){
if(furthest != null && furthest.dst(x, y) < length * 1.5f){
hit.add(furthest.id());
x = furthest.x();
y = furthest.y();