From 709be933322baec830170511da9d0c20f6b3f30b Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Tue, 20 Dec 2022 21:42:20 -0800 Subject: [PATCH] Tidy up more loose ends --- chameleonic.p8 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/chameleonic.p8 b/chameleonic.p8 index af59265..68be32d 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -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,10 +922,8 @@ 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 + if self.latch.rec.dead==true then + self:destroy() end end