- [FIX] La rata no pasaba per un hueco de 8 pixels de alt

- [FIX] Al tornar de l'editor, resetejar hero.invisible
- [NEW] Habitacions al 38%
This commit is contained in:
2026-03-24 13:36:20 +01:00
parent 50f2710986
commit cee6ade851
5 changed files with 3 additions and 2 deletions

View File

@@ -13,14 +13,14 @@ function ia.update_rata(spr)
if spr.flipped then
local tx, ty = (spr.pos.x-1)>>3, (spr.pos.y+7)>>3
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
if map.tile(tx,ty) < 16 and map.tile(tx,ty+1) > 0 then
spr.pos.x = spr.pos.x - 1
else
spr.flipped = not spr.flipped
end
else
local tx, ty = (spr.pos.x+9)>>3, (spr.pos.y+7)>>3
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
if map.tile(tx,ty) < 16 and map.tile(tx,ty+1) > 0 then
spr.pos.x = spr.pos.x + 1
else
spr.flipped = not spr.flipped