LBALab / lba2remake

A Little Big Adventure 2 / Twinsen's Odyssey reimplementation in JavaScript / Three.js / React
MIT License
251 stars 38 forks source link

Fix clock resets when pausing #653

Closed fraserjgordon closed 2 years ago

fraserjgordon commented 2 years ago

When restarting the clock, its elapsed time gets set to zero. Because we track waits according to the elapsed time, this causes all wait ops in life and move scripts to wait for too long after the game is paused (which stops and restarts the clock).

To avoid this, track the total elapsed time every time the clock is stopped.

Preview here: https://pr-653.lba2remake.net