- [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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user