Rewrite rope #11
@ -589,7 +589,7 @@ function level:get_latch(dx,dy,px,py)
|
||||
dx=dx1,dy=dy1,
|
||||
ax_offset=dx1*0.5,
|
||||
ay_offset=dy1*0.5,
|
||||
mx=mx,my=my
|
||||
rec={mx=mx,my=my,px=mx*8,py=my*8},
|
||||
}
|
||||
end
|
||||
end
|
||||
@ -778,7 +778,7 @@ function player:update()
|
||||
|
||||
if self.rope then
|
||||
self.rope:update()
|
||||
self.rope:drag_dst(self.x+0.5,self.y+0.1)
|
||||
self.rope:drag_dst(self.x+self.px/8+0.5,self.y+self.py/8+0.1)
|
||||
|
||||
local tdx,tdy=self.rope:tug_orientxy()
|
||||
if (tdx!=0) self.orientx=tdx
|
||||
@ -922,12 +922,10 @@ function rope:update()
|
||||
self.latch.rec.my+0.5+self.latch.ay_offset
|
||||
)
|
||||
|
||||
if #self.latch.rec.todo==0 then
|
||||
if self.latch.rec.dead==true then
|
||||
self:destroy()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (not self:_check_sane()) self:destroy()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user