From d76699c56ed011b56c4b4366e60290fce581271e Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Sun, 18 Dec 2022 17:37:00 -0800 Subject: [PATCH] Fix another rope bug --- chameleonic.p8 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/chameleonic.p8 b/chameleonic.p8 index 7442438..662ba2a 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -309,6 +309,16 @@ function level:reanchor(remove) end end end + + for _,cr in pairs(self._crates) do + for ax in all{cr.mx*2-1,cr.mx*2+2} do + for ay in all{cr.my*2-1,cr.my*2+2} do + local px,py=self:a2p(ax,ay) + self._anch[_amix(ax,ay)]={ax=ax0,ay=ay0,x=px,y=py} + end + end + end + if (player.rope!=nil) player.rope:make_dirty() end @@ -920,7 +930,6 @@ function rope:draw() end end - --[[ for i=0,#self.ancs+1 do p=self:_anc(i) local c=12 @@ -931,6 +940,7 @@ function rope:draw() for _,p in pairs(level._anch) do pset(p.x,p.y,11) end + --[[ print("dirty:"..tostr(self.dirty),32,0,9) print("busy:"..tostr(self:busy()),32,7,9) print("state:"..tostr(self.state.name),32,14,9)