From: fredboy Date: Sun, 21 Apr 2024 19:10:52 +0000 (+0700) Subject: Add fluid update range restriction X-Git-Tag: alpha0.6.0~2 X-Git-Url: http://deadsoftware.ru/gitweb?p=cavedroid.git;a=commitdiff_plain;h=3b6f968a7a7167b57f43e6e5290ba40547781a0b Add fluid update range restriction --- 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); }