mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
A shot action seeks to the target shot's startProgress, which sceneTimingForShot computes as start / total. sceneSeekState multiplied that back into seconds and compared it with each shot's end, but (start / total) * total can round one ulp below start. The comparison then put the seek at the very end of the previous shot. With five equal 3.9 s shots, "go to" shots 2, 3 and 5 landed on shots 1, 2 and 4. Compare the requested progress against each shot's end / total instead, the same division the caller used, so a shot's own start always selects that shot. Exact boundaries still select the next shot, and anything below a start still selects the previous one.