Rewrite rope #11

Merged
pyrex merged 12 commits from rewrite_rope into main 2022-12-21 05:44:16 +00:00
Showing only changes of commit a7b016c4b2 - Show all commits

View File

@ -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