From f055e35729cbc60f565d5c19407aaf03553ce9d6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 8 May 2022 00:03:06 -0400 Subject: [PATCH] Crash fix --- core/src/mindustry/ai/ControlPathfinder.java | 2 +- .../mindustry/entities/bullet/ContinuousFlameBulletType.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/ai/ControlPathfinder.java b/core/src/mindustry/ai/ControlPathfinder.java index 24b03bc25b..cc3d30dcaa 100644 --- a/core/src/mindustry/ai/ControlPathfinder.java +++ b/core/src/mindustry/ai/ControlPathfinder.java @@ -157,7 +157,7 @@ public class ControlPathfinder{ /** @return whether a path is ready */ public boolean getPathPosition(Unit unit, int pathId, Vec2 destination, Vec2 out){ //uninitialized - if(threads == null) return false; + if(threads == null || !world.tiles.in(World.toTile(destination.x), World.toTile(destination.y))) return false; PathCost costType = unit.type.pathCost; int team = unit.team.id; diff --git a/core/src/mindustry/entities/bullet/ContinuousFlameBulletType.java b/core/src/mindustry/entities/bullet/ContinuousFlameBulletType.java index 470b200323..36c8d9017c 100644 --- a/core/src/mindustry/entities/bullet/ContinuousFlameBulletType.java +++ b/core/src/mindustry/entities/bullet/ContinuousFlameBulletType.java @@ -86,6 +86,7 @@ public class ContinuousFlameBulletType extends ContinuousBulletType{ } } + Tmp.v1.trns(b.rotation(), realLength * 1.1f); Drawf.light(b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, lightStroke, lightColor, 0.7f); Draw.reset(); }