From 3b6f968a7a7167b57f43e6e5290ba40547781a0b Mon Sep 17 00:00:00 2001 From: fredboy Date: Mon, 22 Apr 2024 02:10:52 +0700 Subject: [PATCH] Add fluid update range restriction --- .../game/world/GameWorldFluidsLogicControllerTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/ru/deadsoftware/cavedroid/game/world/GameWorldFluidsLogicControllerTask.java b/core/src/ru/deadsoftware/cavedroid/game/world/GameWorldFluidsLogicControllerTask.java index ed6b1ec..99d1a04 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/world/GameWorldFluidsLogicControllerTask.java +++ b/core/src/ru/deadsoftware/cavedroid/game/world/GameWorldFluidsLogicControllerTask.java @@ -167,7 +167,7 @@ public class GameWorldFluidsLogicControllerTask extends Timer.Task { private void fluidUpdater() { int midScreen = (int) mMobsController.getPlayer().x / 16; for (int y = mGameWorld.getHeight() - 1; y >= 0; y--) { - for (int x = 0; x <= mGameWorld.getWidth() / 2; x++) { + for (int x = 0; x <= Math.min(mGameWorld.getWidth() / 2, 32); x++) { updateFluids(midScreen + x, y); updateFluids(midScreen - x, y); } -- 2.29.2