From: fred-boy Date: Fri, 27 Sep 2019 08:55:47 +0000 (+0700) Subject: Fix lava flow X-Git-Tag: alpha0.4~53 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=0d17e8d14a41f6fcedf2b52f01cd7ea88186280f;p=cavedroid.git Fix lava flow --- diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameFluidsThread.java b/core/src/ru/deadsoftware/cavedroid/game/GameFluidsThread.java index 272cd5d..d404c43 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/GameFluidsThread.java +++ b/core/src/ru/deadsoftware/cavedroid/game/GameFluidsThread.java @@ -11,7 +11,7 @@ public class GameFluidsThread extends Thread { private static final int FLUID_STATES = 5; private static final int[] WATER_IDS = {8, 60, 61, 62, 63}; - private static final int[] LAVA_IDS = {9, 64, 65, 65, 67}; + private static final int[] LAVA_IDS = {9, 64, 65, 66, 67}; private long fluidLastUpdateTimestamp = 0; diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameItems.java b/core/src/ru/deadsoftware/cavedroid/game/GameItems.java index c3e0207..87bb3d6 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/GameItems.java +++ b/core/src/ru/deadsoftware/cavedroid/game/GameItems.java @@ -37,8 +37,8 @@ public class GameItems { public static boolean fluidCanFlowThere(int thisId, int thatId) { return thatId == 0 || (!getBlock(thatId).hasCollision() && !isFluid(thatId)) || - (isWater(thisId) && isWater(thatId) && thatId >= thisId) || - (isLava(thisId) && isLava(thatId) && thatId >= thisId); + (isWater(thisId) && isWater(thatId) && thisId < thatId) || + (isLava(thisId) && isLava(thatId) && thisId < thatId); } public static Block getBlock(int id) {