Fix rope bugs I introduced
This commit is contained in:
parent
64ef489c2a
commit
8d37dbef80
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user