X-Git-Url: https://deadsoftware.ru/gitweb?p=cavecraft.git;a=blobdiff_plain;f=src%2Fitems_logic.mpsrc;h=efcee9fb5ecb4034a8e3c47b848166b25fd43625;hp=a0816c786b5cf4a569b16b157452430252312bb9;hb=f69f36f1ce7426048c8ddfef03f7b237164403ad;hpb=13a872abec65a21544bfa928624c6bf3975fd50f diff --git a/src/items_logic.mpsrc b/src/items_logic.mpsrc index a0816c7..efcee9f 100644 --- a/src/items_logic.mpsrc +++ b/src/items_logic.mpsrc @@ -12,7 +12,7 @@ interface procedure updateBlock(x, y:integer); implementation - uses invui, maps, drop, console, furnace, png3, func, jpeg, mob, vars, bmp, items, chest, inv, player, items_store, particles, worldgen, phy, sign; + uses invui, maps, drop, console, furnace, png3, func, jpeg, mobs, vars, bmp, items, chest, inv, player, items_store, particles, worldgen, phy, sign; procedure usebonemeal(block:integer); var @@ -853,7 +853,7 @@ procedure destroy_block_cr(id, xx, yy:integer); begin if getBlockColl(block)=0 then begin - mob.create(M_ZOMBY, x*16, y*16); + Mobs.Create(Mobs.zomby, x * 16, y * 16); decItem(invcur); end; end; @@ -1253,8 +1253,9 @@ procedure updateBlock(x, y:integer); else if block=63 then begin - if (light>7) or (getMap(x, y+1)=0) then - setmap(0, x, y); + // В зимнем биоме снег не растапливается при сильном свете + if ((light > 7) and (getBiomMap(x) <> 2)) or (getMap(x, y + 1) = 0) then + setmap(0, x, y); end; else if block=74 then @@ -1364,9 +1365,9 @@ procedure updateBlock(x, y:integer); else if block=30 then begin - if (random(GENWOOD_RND)=random(GENWOOD_RND)) and (getMap(x, y+2)<>30) then - setMap(30, x, y-1); - if (getMap(x, y+1)<>7) or (getMap(x, y+1)<>30) then + if (random(GENWOOD_RND) = random(GENWOOD_RND)) and (getMap(x, y + 2) <> 30) then + setMap(30, x, y - 1); + if (getMap(x, y + 1) <> 7) and (getMap(x, y + 1) <> 30) then begin setMap(0, x, y); destroy_block_1(block, x, y);