From 2dee4a380fafb56a8b583921b64a1f92490b2602 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 30 Jun 2022 20:05:53 -0400 Subject: [PATCH] Pathfinder fix / Version logging --- core/src/mindustry/Vars.java | 4 ++++ core/src/mindustry/ai/Pathfinder.java | 5 +++-- core/src/mindustry/content/Fx.java | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/Vars.java b/core/src/mindustry/Vars.java index 7151312f83..39463d5400 100644 --- a/core/src/mindustry/Vars.java +++ b/core/src/mindustry/Vars.java @@ -279,6 +279,10 @@ public class Vars implements Loadable{ Version.init(); CacheLayer.init(); + if(!headless){ + Log.info("[Mindustry] Version: @", Version.buildString()); + } + dataDirectory = settings.getDataDirectory(); screenshotDirectory = dataDirectory.child("screenshots/"); customMapDirectory = dataDirectory.child("maps/"); diff --git a/core/src/mindustry/ai/Pathfinder.java b/core/src/mindustry/ai/Pathfinder.java index 9fbb0db8b8..36ce0f4b2e 100644 --- a/core/src/mindustry/ai/Pathfinder.java +++ b/core/src/mindustry/ai/Pathfinder.java @@ -12,6 +12,7 @@ import mindustry.game.EventType.*; import mindustry.game.*; import mindustry.gen.*; import mindustry.world.*; +import mindustry.world.blocks.*; import mindustry.world.blocks.environment.*; import mindustry.world.blocks.storage.*; import mindustry.world.meta.*; @@ -152,11 +153,11 @@ public class Pathfinder implements Runnable{ /** Packs a tile into its internal representation. */ public int packTile(Tile tile){ - boolean nearLiquid = false, nearSolid = false, nearGround = false, solid = tile.solid(), allDeep = tile.floor().isDeep(); + boolean nearLiquid = false, nearSolid = false, nearGround = false, solid = tile.solid() || tile.block() instanceof ConstructBlock, allDeep = tile.floor().isDeep(); for(int i = 0; i < 4; i++){ Tile other = tile.nearby(i); - if(other != null) { + if(other != null){ Floor floor = other.floor(); boolean osolid = other.solid(); if(floor.isLiquid) nearLiquid = true; diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 06bbd39026..0aee7fda1b 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -1616,7 +1616,7 @@ public class Fx{ alpha(0.5f); rand.setSeed(e.id); for(int i = 0; i < 35; i++){ - v.trns(e.rotation + rand.range(21f), rand.random(e.finpow() * 90f)).add(rand.range(3f), rand.range(3f)); + v.trns(e.rotation + 180f + rand.range(21f), rand.random(e.finpow() * 90f)).add(rand.range(3f), rand.range(3f)); e.scaled(e.lifetime * rand.random(0.2f, 1f), b -> { Fill.circle(e.x + v.x, e.y + v.y, b.fout() * 9f + 0.3f); });