- [FIX] l'heroi podia clavar-se pel tile de dalt d'una corda
This commit is contained in:
@@ -115,8 +115,8 @@ function ia.update_hero()
|
||||
-- SI PULSA AMUNT...
|
||||
if key.down(key.UP) or pad.down(pad.UP) then
|
||||
anim = move_anim
|
||||
local tx1, tx2, ty = (sprites.hero.pos.x+4)>>3, (sprites.hero.pos.x+11)>>3, (sprites.hero.pos.y)>>3
|
||||
if map.tile(tx1,ty) < 16 or map.tile(tx2,ty) < 16 then
|
||||
local tx1, tx2, ty = (sprites.hero.pos.x+8)>>3, (sprites.hero.pos.x+11)>>3, (sprites.hero.pos.y)>>3
|
||||
if map.tile(tx1,ty) < 16 then --or map.tile(tx2,ty) < 16 then
|
||||
if ty+1<rooms.pos.y then
|
||||
game.change_room(0,-1)
|
||||
else
|
||||
@@ -163,7 +163,9 @@ function ia.update_hero()
|
||||
local broken_tile = templates.create("brick", {pos={x=tx2<<3, y=(ty+2)<<3}, flipped=sprites.hero.flipped})
|
||||
table.insert(sprites.list, broken_tile)
|
||||
end
|
||||
sprites.hero.pos.y = (ty<<3)-1
|
||||
if tile_under_me1>=16 or tile_under_me1>=16 then
|
||||
sprites.hero.pos.y = (ty<<3)-1
|
||||
end
|
||||
anim = "hero_stand"
|
||||
sprites.save_safe_pos()
|
||||
-- SI ESTÀ SOBRE UNES ESCALERES I POLSA AVALL...
|
||||
|
||||
Reference in New Issue
Block a user