Rewrite rope #11
@ -1103,8 +1103,7 @@ function rope:_drag1(n1,ax1_new,ay1_new)
|
|||||||
local ax0,ay0=n0.ax,n0.ay
|
local ax0,ay0=n0.ax,n0.ay
|
||||||
for _,anchor in level:anchor_points() do
|
for _,anchor in level:anchor_points() do
|
||||||
if
|
if
|
||||||
(_in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) or
|
_in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) and
|
||||||
_in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)) and
|
|
||||||
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) !=
|
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) !=
|
||||||
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)
|
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)
|
||||||
then
|
then
|
||||||
@ -1120,8 +1119,7 @@ function rope:_drag1(n1,ax1_new,ay1_new)
|
|||||||
local ax2,ay2=n2.ax,n2.ay
|
local ax2,ay2=n2.ax,n2.ay
|
||||||
for _,anchor in level:anchor_points() do
|
for _,anchor in level:anchor_points() do
|
||||||
if
|
if
|
||||||
(_in_box(anchor.ax,anchor.ay,ax1_old,ay1_old,ax2,ay2) or
|
_in_box(anchor.ax,anchor.ay,ax1_old,ay1_old,ax2,ay2) and
|
||||||
_in_box(anchor.ax,anchor.ay,ax1_new,ay1_new,ax2,ay2)) and
|
|
||||||
_which_side(anchor.ax,anchor.ay,ax1_old,ay1_old,ax2,ay2) !=
|
_which_side(anchor.ax,anchor.ay,ax1_old,ay1_old,ax2,ay2) !=
|
||||||
_which_side(anchor.ax,anchor.ay,ax1_new,ay1_new,ax2,ay2)
|
_which_side(anchor.ax,anchor.ay,ax1_new,ay1_new,ax2,ay2)
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user