ff to current state #6

Merged
kistaro merged 27 commits from pyrex/chameleonic:main into main 2022-12-19 07:03:33 +00:00
Showing only changes of commit 8d37dbef80 - Show all commits

View File

@ -1398,19 +1398,18 @@ function rope:_tug(hypothetically)
for i=#ancs-1,2,-1 do 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_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={},{} local ops_to_do,corners={},{}
if #ops_before_trash>0 then if #ops_before_trash>0 then
ops_to_do=ops_before_trash ops_to_do=ops_before_trash
corners[i-1]=true corners[i-1]=true
corners[i]=hit_end1
else 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 ops_to_do=ops_after_trash
corners[i]=true corners[i-1]=true
corners[i]=hit_end1
end end
local corners={}
if (hit_end1 and hit_end2) corners[i-1],corners[i]=true,true
local ops=ops_to_do local ops=ops_to_do
if #ops>0 then if #ops>0 then
@ -1594,7 +1593,7 @@ function rope:_calc_push(
break break
else else
if not level:can_move(false,o.mx,o.my,o.dmx,o.dmy,0,0) then if not level:can_move(false,o.mx,o.my,o.dmx,o.dmy,0,0) then
hit_end=false hit_end=false
break break
end end
end end