From 50f27109861e385a1df38ddb66f481f4d3ed0f76 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Tue, 24 Mar 2026 13:11:48 +0100 Subject: [PATCH] - [FIX] l'heroi podia clavar-se pel tile de dalt d'una corda --- data/modules/ia/hero.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data/modules/ia/hero.lua b/data/modules/ia/hero.lua index 56c051a..ea83f34 100644 --- a/data/modules/ia/hero.lua +++ b/data/modules/ia/hero.lua @@ -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=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...