- FIX: els bocadills apareixen on toca quan fas scroll

This commit is contained in:
2023-02-03 19:02:46 +01:00
parent 74563f74d6
commit 964cb37d7c

View File

@@ -12,11 +12,11 @@ balloon={
if not actor then return end if not actor then return end
if rectangle==nil then if rectangle==nil then
balloon.rect={x=8,y=actor.y*8-4,w=144,h=35} balloon.rect={x=8,y=actor.y*8-4-game.cam.y,w=144,h=35}
else else
balloon.rect={} balloon.rect={}
balloon.rect.x=rectangle.x*8 balloon.rect.x=rectangle.x*8
balloon.rect.y=actor.y*8-4 balloon.rect.y=actor.y*8-4-game.cam.y
balloon.rect.w=rectangle.w*8 balloon.rect.w=rectangle.w*8
balloon.rect.h=rectangle.h*9+8 balloon.rect.h=rectangle.h*9+8
end end
@@ -31,7 +31,7 @@ balloon={
balloon.old_update=update balloon.old_update=update
update=balloon.update update=balloon.update
local pos=actor.x*8+8 local pos=actor.x*8+8-game.cam.x
if below==nil or below==false then if below==nil or below==false then
balloon.rect.y=balloon.rect.y-balloon.rect.h-16 balloon.rect.y=balloon.rect.y-balloon.rect.h-16