[FIX] Incidencia #9 resolta

This commit is contained in:
2026-05-01 18:16:01 +02:00
parent bbcb6cc667
commit 20646e9c64
5 changed files with 16 additions and 15 deletions

View File

@@ -118,7 +118,7 @@ function abad:draw()
abad.respawning=abad.respawning-1 abad.respawning=abad.respawning-1
end end
-- draw.rect(x+abad.bb.x,y+abad.bb.y,abad.bb.w,abad.bb.h,3) draw.rect(x+abad.bb.x,y+abad.bb.y,abad.bb.w,abad.bb.h,3)
end end
function abad_make_safe( force ) function abad_make_safe( force )
@@ -203,7 +203,7 @@ function abad_jump()
local not_block_tile = tile1_hit_type ~= tiletype.block and tile2_hit_type ~= tiletype.block local not_block_tile = tile1_hit_type ~= tiletype.block and tile2_hit_type ~= tiletype.block
-- local switch_tile = tile1_hit_type == tiletype.switch or tile2_hit_type == tiletype.switch -- local switch_tile = tile1_hit_type == tiletype.switch or tile2_hit_type == tiletype.switch
-- print("JUMP > "..x1_check..", "..x2_check..", "..y_check) -- print("JUMP > "..x1_check..", "..x2_check..", "..y_check)
-- print("T1= "..tile1_hit_type.." / T2= "..tile2_hit_type) -- print("T1= "..tile1_hit_type.." / T2= "..tile2_hit_type.." / SW= "..tiletype.switch)
-- local msg = "BLOCK TILE HITTED" -- local msg = "BLOCK TILE HITTED"
-- if not_block_tile then msg="not block" end -- if not_block_tile then msg="not block" end
-- print(msg) -- print(msg)

View File

@@ -33,10 +33,10 @@ function table_key (tabla, valor)
end end
function collision(a, b) function collision(a, b)
return (a.x+a.bb.x+a.bb.w >= b.x+b.bb.x) return (a.x+a.bb.x+a.bb.w > b.x+b.bb.x)
and (a.x+a.bb.x <= b.x+b.bb.x+b.bb.w) and (a.x+a.bb.x < b.x+b.bb.x+b.bb.w)
and (a.y+a.bb.y+a.bb.h >= b.y+b.bb.y) and (a.y+a.bb.y+a.bb.h > b.y+b.bb.y)
and (a.y+a.bb.y <= b.y+b.bb.y+b.bb.h) and (a.y+a.bb.y < b.y+b.bb.y+b.bb.h)
end end
function half_collision(a, b) function half_collision(a, b)

View File

@@ -153,7 +153,8 @@ function arc_check_tile(world_x,world_y,debug)
return tiletype.half, tile return tiletype.half, tile
elseif tile<15 then elseif tile<15 then
return tiletype.stair, tile return tiletype.stair, tile
elseif tile==15 then -- 23 = Tile transparent, necesari per a dibuixar els switchos en la versió arcade
elseif tile==23 then
return tiletype.switch, tile return tiletype.switch, tile
elseif tile<64 then elseif tile<64 then
return tiletype.block, tile return tiletype.block, tile

View File

@@ -58,7 +58,7 @@ function trigger:draw()
end end
-- debug rect -- debug rect
-- draw.rect(scr_x,scr_y,self.bb.w,self.bb.h,3) draw.rect(scr_x,scr_y,self.bb.w,self.bb.h,3)
end end
--function trigger:do_touched() --function trigger:do_touched()