[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
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
function abad_make_safe( force )
@@ -201,9 +201,9 @@ function abad_jump()
local tile1_hit_type= arc_check_tile(x1_check, y_check )
local tile2_hit_type= arc_check_tile(x2_check, y_check)
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("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"
-- if not_block_tile then msg="not block" end
-- print(msg)

View File

@@ -33,10 +33,10 @@ function table_key (tabla, valor)
end
function collision(a, b)
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.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)
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.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)
end
function half_collision(a, b)

View File

@@ -153,7 +153,8 @@ function arc_check_tile(world_x,world_y,debug)
return tiletype.half, tile
elseif tile<15 then
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
elseif tile<64 then
return tiletype.block, tile

View File

@@ -618,13 +618,13 @@ stage1_mapa={
},
-- 39
{
28,29,25,25,28,29,25,25,28,29,25,25,
256,256,25,25,256,256,256,256,256,256,106,24,
28, 29, 25, 25, 28, 29, 25, 25, 28, 29, 25, 25,
256,256, 25, 25,256,256,256,256,256,256,106, 24,
-- 256,256,15,256,256,256,256,256,256,256,95,24,
256,256,23,256,256,256,256,256,256,256,95,24,
256,256,256,256,78,97,107,108,256,106,105,24,
256,256,256,256,94,101,102,110,103,105,98,24,
28,29,28,29,28,29,28,29,28,29,28,29,
256,256, 23,256,256,256,256,256,256,256, 95, 24,
256,256,256,256, 78, 97,107,108,256,106,105, 24,
256,256,256,256, 94,101,102,110,103,105, 98, 24,
28, 29, 28, 29, 28, 29, 28, 29, 28, 29, 28, 29,
},
-- 40

View File

@@ -58,7 +58,7 @@ function trigger:draw()
end
-- 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
--function trigger:do_touched()