residualvm/residualvm — pull request #1143 by chkr-private (2014-12-31 14:07:58+00:00)
Title: GRIM/EMI: Limit frequency of luaUpdate()

- if luaUpdate() is called more than once during the same millisecond
then delay the next call by one millisecond
- this avoids the issue that _frameTime is set to 0 which would
cause getPerSecond() to return 0 for any given rate
- if getPerSecond() returns 0 then that would cause dist to be 0 in walkForward() which would cause the walk animation to stop (even if the actor is supposed to keep walking)
- if that happens, e.g. Guybrush would walk quite erratically