From a7b016c4b2b1eae07599fb97f95902720bf5f2d2 Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Mon, 19 Dec 2022 23:20:48 -0800 Subject: [PATCH] We should only care about anchors on the old path --- chameleonic.p8 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/chameleonic.p8 b/chameleonic.p8 index aede61f..414ce32 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -1103,8 +1103,7 @@ function rope:_drag1(n1,ax1_new,ay1_new) local ax0,ay0=n0.ax,n0.ay for _,anchor in level:anchor_points() do if - (_in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) or - _in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)) and + _in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) and _which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) != _which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new) then @@ -1120,8 +1119,7 @@ function rope:_drag1(n1,ax1_new,ay1_new) local ax2,ay2=n2.ax,n2.ay for _,anchor in level:anchor_points() do if - (_in_box(anchor.ax,anchor.ay,ax1_old,ay1_old,ax2,ay2) or - _in_box(anchor.ax,anchor.ay,ax1_new,ay1_new,ax2,ay2)) and + _in_box(anchor.ax,anchor.ay,ax1_old,ay1_old,ax2,ay2) and _which_side(anchor.ax,anchor.ay,ax1_old,ay1_old,ax2,ay2) != _which_side(anchor.ax,anchor.ay,ax1_new,ay1_new,ax2,ay2) then