From 48762ed9d27b65769b216682ba7d60c7864a8379 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 13 Apr 2022 21:07:16 -0400 Subject: [PATCH] No hints / Fixed floor caching bug --- core/src/mindustry/graphics/FloorRenderer.java | 4 ++-- core/src/mindustry/ui/fragments/HintsFragment.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/graphics/FloorRenderer.java b/core/src/mindustry/graphics/FloorRenderer.java index 836481b92c..faac3456e4 100644 --- a/core/src/mindustry/graphics/FloorRenderer.java +++ b/core/src/mindustry/graphics/FloorRenderer.java @@ -278,8 +278,8 @@ public class FloorRenderer{ private void cacheChunk(int cx, int cy){ used.clear(); - for(int tilex = cx * chunksize; tilex < (cx + 1) * chunksize && tilex < world.width(); tilex++){ - for(int tiley = cy * chunksize; tiley < (cy + 1) * chunksize && tiley < world.height(); tiley++){ + for(int tilex = Math.max(cx * chunksize - 1, 0); tilex < (cx + 1) * chunksize + 1 && tilex < world.width(); tilex++){ + for(int tiley = Math.max(cy * chunksize - 1, 0); tiley < (cy + 1) * chunksize + 1 && tiley < world.height(); tiley++){ Tile tile = world.rawTile(tilex, tiley); boolean wall = tile.block().cacheLayer != CacheLayer.normal; diff --git a/core/src/mindustry/ui/fragments/HintsFragment.java b/core/src/mindustry/ui/fragments/HintsFragment.java index 9b7198fee3..98cc83008f 100644 --- a/core/src/mindustry/ui/fragments/HintsFragment.java +++ b/core/src/mindustry/ui/fragments/HintsFragment.java @@ -38,7 +38,8 @@ public class HintsFragment{ public void build(Group parent){ group.setFillParent(true); group.touchable = Touchable.childrenOnly; - group.visibility = () -> Core.settings.getBool("hints", true) && ui.hudfrag.shown; + //TODO hints off for now. + group.visibility = () -> !state.isCampaign() && Core.settings.getBool("hints", true) && ui.hudfrag.shown; group.update(() -> { if(current != null){ //current got completed