- [NEW] Alguns ajustos en habitacions

- [FIX] Càlcul del tile més robust
This commit is contained in:
Raimon @ quifisraimon committed 2026-09-30 12:58:48 +02:00
1 parent af2c8fb68d
commit 7b63f963b0
17 files changed
+38 -32

No files matched your search

+2 -2
View File
@@ -3,12 +3,12 @@ function ia.update_brick(spr)
if spr.timeout > 0 then
spr.timeout = spr.timeout - 1
if spr.timeout == 0 then
local tx, ty = spr.pos.x>>3, spr.pos.y>>3
local tx, ty = sprites.get_tile(spr.pos.x), sprites.get_tile(spr.pos.y)
map.tile(tx,ty,0)
end
else
spr.pos.y = spr.pos.y + 2
local tx, ty = (spr.pos.x+2)>>3, (spr.pos.y)>>3
local tx, ty = sprites.get_tile(spr.pos.x+2), sprites.get_tile(spr.pos.y)
if rooms.is_outside(tx,ty) then sprites.remove(spr) return end
end
end