[CHG] Ajustos en el copter per a dur conductor

This commit is contained in:
2026-05-31 13:46:56 +02:00
parent ef87fd3c25
commit 9d044d10f9
7 changed files with 67 additions and 47 deletions
+26 -27
View File
@@ -64,9 +64,11 @@ function abad_init()
bb={x=8,y=0,w=16,h=32},
safe={hab=10,x=40,y=24},
move=abad.move,
mood="normal"}
mood="normal",
vehicle=""}
abad.update=abad_state_normal
abad.objects={}
-- abad.objects={clau_premiere = true, clau_elalien = true}
end
function abad:move( x, y )
@@ -102,36 +104,33 @@ end
function abad:draw()
local flip = abad.flip
local x, y = viewp:screen_coords(self.x, self.y)
if abad.update==abad_state_stairs then
-- flip=abad.stairs_flip
-- -- flip=(((abad.x>>1)+(abad.y>>1))%2)==0
if math.abs(abad.stairs_moves-(abad.x+abad.y))>12 then
abad.stairs_moves = abad.x+abad.y
abad.flip = not abad.flip
if abad.vehicle=="" then
if abad.update==abad_state_stairs then
if math.abs(abad.stairs_moves-(abad.x+abad.y))>12 then
abad.stairs_moves = abad.x+abad.y
abad.flip = not abad.flip
end
flip = abad.flip
end
flip = abad.flip
-- if ((abad.x+abad.y)%12)==0 then
-- abad.stairs_flip=not abad.stairs_flip
-- end
-- local msg = "-- "..abad.x.." "..abad.y
-- if flip then msg = "FLIP"..abad.x.." "..abad.y end
-- -- msg_print(0,35,msg,true)
end
if (abad.respawning==0) or (math.floor(abad.respawning/15)%2==0) then
draw.surf(abad.frame*abad.w,0,abad.w,abad.h,x,y,abad.w,abad.h,flip)
-- caminant, parat, disparant o saltant
if abad.frame<=3 or abad.frame==6 then
abad_add_mood(x,0,y,0,flip,abad.mood)
if (abad.respawning==0) or (math.floor(abad.respawning/15)%2==0) then
draw.surf(abad.frame*abad.w,0,abad.w,abad.h,x,y,abad.w,abad.h,flip)
-- caminant, parat, disparant o saltant
if abad.frame<=3 or abad.frame==6 then
abad_add_mood(x,0,y,0,flip,abad.mood)
end
end
end
if abad.respawning > 0 then
abad.respawning=abad.respawning-1
end
-- draw.rect(x+abad.bb.x,y+abad.bb.y,abad.bb.w,abad.bb.h,3)
if abad.respawning > 0 then
abad.respawning=abad.respawning-1
end
-- draw.rect(x+abad.bb.x,y+abad.bb.y,abad.bb.w,abad.bb.h,3)
elseif abad.vehicle=="copter" then
surf.source.push(tiles2)
draw.surf(96,0,abad.w,abad.h,x,y,abad.w,abad.h,flip)
surf.source.pop()
end
end
function abad_make_safe( force )