Widen some angle tolerances, based on testing

This commit is contained in:
Pyrex 2022-12-18 18:00:59 -08:00
parent 35638b39cd
commit 456796beca

View File

@ -1487,7 +1487,7 @@ function rope:_tug(hypothetically)
(dmx!=0 and sgn0(pull_dx)!=dmx) or
(dmy!=0 and sgn0(pull_dy)!=dmy) or
_vec_ang_diff(pull_anc.x\8-mx0,pull_anc.y\8-my0,dmx,dmy) > 0.125 or
_vec_ang_diff(pull_anc.x\8-mx0,pull_anc.y\8-my0,dmx,dmy) >= 0.185 or
sgn0(mx0-mxa)!=
sgn0(mx0+dmx-mxa) or
@ -1538,14 +1538,14 @@ function rope:_calc_push(
local mx,dmx
if a0.x%8==0 and a0.x>an.x+7 then
needs_good_pull=needs_good_pull or af.x>=a1.x
if (needs_good_pull and _ang_diff(pull_ang,0.0)>=0.125) return {}
if (needs_good_pull and _ang_diff(pull_ang,0.0)>=0.185) return {}
-- push left
mx=(a0.x-1)\8
dmx=-1
elseif a0.x%8==7 and a0.x<an.x-7 then
needs_good_pull=needs_good_pull or af.x<=a1.x
if (needs_good_pull and _ang_diff(pull_ang,0.5)>=0.125) return {}
if (needs_good_pull and _ang_diff(pull_ang,0.5)>=0.185) return {}
-- push right
mx=(a0.x+1)\8
@ -1570,7 +1570,7 @@ function rope:_calc_push(
local my,dmy
if a0.y%8==0 and a0.y>an.y+6 then
needs_good_pull=needs_good_pull or af.y>=a1.y
if (needs_good_pull and _ang_diff(pull_ang,0.75)>=0.125) return {}
if (needs_good_pull and _ang_diff(pull_ang,0.75)>=0.185) return {}
-- push up
my=(a0.y-1)\8
@ -1578,7 +1578,7 @@ function rope:_calc_push(
elseif a0.y%8==7 and a0.y<an.y-6 then
needs_good_pull=needs_good_pull or af.y<=a1.y
if (needs_good_pull and _ang_diff(pull_ang,0.25)>=0.125) return {}
if (needs_good_pull and _ang_diff(pull_ang,0.25)>=0.185) return {}
-- push down
my=(a0.y+1)\8