DEADSOFTWARE

Fix snow and cactus logic
[cavecraft.git] / src / items_logic.mpsrc
index a0816c786b5cf4a569b16b157452430252312bb9..6c730f618f5345b68b5aceecc3373ae2a50cdf0f 100644 (file)
@@ -1253,8 +1253,9 @@ procedure updateBlock(x, y:integer);
   else\r
   if block=63 then\r
    begin\r
   else\r
   if block=63 then\r
    begin\r
-    if (light>7) or (getMap(x, y+1)=0) then\r
-     setmap(0, x, y);\r
+    // В зимнем биоме снег не растапливается при сильном свете\r
+    if ((light > 7) and (getBiomMap(x) <> 2)) or (getMap(x, y + 1) = 0) then\r
+      setmap(0, x, y);\r
    end;\r
   else\r
   if block=74 then\r
    end;\r
   else\r
   if block=74 then\r
@@ -1364,9 +1365,9 @@ procedure updateBlock(x, y:integer);
   else\r
   if block=30 then\r
    begin\r
   else\r
   if block=30 then\r
    begin\r
-    if (random(GENWOOD_RND)=random(GENWOOD_RND)) and (getMap(x, y+2)<>30) then\r
-     setMap(30, x, y-1);\r
-    if (getMap(x, y+1)<>7) or (getMap(x, y+1)<>30) then\r
+    if (random(GENWOOD_RND) = random(GENWOOD_RND)) and (getMap(x, y + 2) <> 30) then\r
+     setMap(30, x, y - 1);\r
+    if (getMap(x, y + 1) <> 7) and (getMap(x, y + 1) <> 30) then\r
      begin\r
       setMap(0, x, y);\r
       destroy_block_1(block, x, y);\r
      begin\r
       setMap(0, x, y);\r
       destroy_block_1(block, x, y);\r