From 0d17e8d14a41f6fcedf2b52f01cd7ea88186280f Mon Sep 17 00:00:00 2001 From: fred-boy Date: Fri, 27 Sep 2019 15:55:47 +0700 Subject: [PATCH] Fix lava flow --- core/src/ru/deadsoftware/cavedroid/game/GameFluidsThread.java | 2 +- core/src/ru/deadsoftware/cavedroid/game/GameItems.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.29.2