diff --git a/chameleonic.p8 b/chameleonic.p8 index 7f2c2a0..e21d16a 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -1398,19 +1398,18 @@ function rope:_tug(hypothetically) for i=#ancs-1,2,-1 do local ops_before_trash,hit_end1=self:_calc_push(ancs[i+1],ancs[i],ancs[i-1],ancs[i-2]) - local ops_after_trash,hit_end2=self:_calc_push(ancs[i-2],ancs[i-1],ancs[i],ancs[i+1]) local ops_to_do,corners={},{} if #ops_before_trash>0 then ops_to_do=ops_before_trash corners[i-1]=true + corners[i]=hit_end1 else + local ops_after_trash,hit_end2=self:_calc_push(ancs[i-2],ancs[i-1],ancs[i],ancs[i+1]) ops_to_do=ops_after_trash - corners[i]=true + corners[i-1]=true + corners[i]=hit_end1 end - local corners={} - if (hit_end1 and hit_end2) corners[i-1],corners[i]=true,true - local ops=ops_to_do if #ops>0 then @@ -1594,7 +1593,7 @@ function rope:_calc_push( break else if not level:can_move(false,o.mx,o.my,o.dmx,o.dmy,0,0) then - hit_end=false + hit_end=false break end end