DEADSOFTWARE

Fix lava flow
authorfred-boy <fredboy@protonmail.com>
Fri, 27 Sep 2019 08:55:47 +0000 (15:55 +0700)
committerfred-boy <fredboy@protonmail.com>
Sun, 29 Sep 2019 04:39:17 +0000 (11:39 +0700)
core/src/ru/deadsoftware/cavedroid/game/GameFluidsThread.java
core/src/ru/deadsoftware/cavedroid/game/GameItems.java

index 272cd5de34f3630ba07ce10049371f0e15df7805..d404c43aca84b79aaca1bd7b5aac1d1db923238b 100644 (file)
@@ -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;
 
index c3e020791570a456bf906f41165d8a76cb654171..87bb3d66a0cd4c0ac3a1196dc115d8cdf4f88fa6 100644 (file)
@@ -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) {