minor orca animation changes

This commit is contained in:
Kistaro Windrider 2024-02-16 19:23:09 -08:00
parent f4459ded0d
commit c7f3552d9f
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -1307,7 +1307,7 @@ function toyphin:update()
new_y = 64 + ((dy + y - 64)/dy * -3.8) new_y = 64 + ((dy + y - 64)/dy * -3.8)
dy = -3.8 dy = -3.8
else else
dy = (dy - 7.6) / 3 dy = (dy - 7.6) / 2.5
end end
else else
-- brake -- brake
@ -1316,7 +1316,7 @@ function toyphin:update()
new_y = 64 new_y = 64
dy = 0 dy = 0
else else
dy /= 2 dy /= 1.75
end end
end end
elseif new_y >= 64 and y < 64 then elseif new_y >= 64 and y < 64 then
@ -1328,7 +1328,7 @@ function toyphin:update()
new_y = 64 - ((dy - y + 64)/dy * 3.8) new_y = 64 - ((dy - y + 64)/dy * 3.8)
dy = 3.8 dy = 3.8
else else
dy = (7.6 + dy) / 3 dy = (7.6 + dy) / 2.5
end end
else else
--brake --brake
@ -1337,7 +1337,7 @@ function toyphin:update()
new_y = 64 new_y = 64
dy = 0 dy = 0
else else
dy /= 2 dy /= 1.75
end end
end end
end end
@ -1346,22 +1346,21 @@ function toyphin:update()
local wet, st = y > 64, phinstate_error local wet, st = y > 64, phinstate_error
if dy < -2.15 then if dy < -2.15 then
st = wet and phinstate_rise_full or phinstate_jump_full st = wet and phinstate_rise_full or phinstate_jump_full
elseif dy <= -1 and (y < 60 or y > 68) then elseif dy <= -1.45 then
st = wet and phinstate_rise_wax or phinstate_jump_wane st = wet and phinstate_rise_wax or phinstate_jump_wane
elseif dy <= -1 then elseif dy < 1.45 then
st = phinstate_nrm if y > 50 and y < 78 then
elseif dy < 1 then st = phinstate_nrm
-- handle idle special case later else
st = wet and phinstate_return or phinstate_crest st = wet and phinstate_return or phinstate_crest
elseif dy <= 2.15 and (y < 60 or y < 68) then end
st = wet and phinstate_dive_wane or phinstate_fall_wax
elseif dy <= 2.15 then elseif dy <= 2.15 then
st = phinstate_nrm st = wet and phinstate_dive_wane or phinstate_fall_wax
else else
st = wet and phinstate_dive_full or phinstate_fall_full st = wet and phinstate_dive_full or phinstate_fall_full
end end
if (y == 64 and dy == 0) st = phinstate_nrm if (y > 50 and y < 78 and dy > -1.35 and dy <1.35 ) st = phinstate_nrm
-- test mode -- test mode
--if (btn(5)) self.exiting = true --if (btn(5)) self.exiting = true
self.x, self.y, self.dy, self.state = x, y, dy, st self.x, self.y, self.dy, self.state = x, y, dy, st