History

Merge branch 'master' of github.com:highfidelity/hifi into use-local-scripts

Seth Alves committed 10 years ago

Commit bb433472 parents 26e01bb b72c28839 files · +471 −238Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 39 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+7−4
@@ -673,11 +673,14 @@ void ScriptEngine::run() { · 672 unmodified lines
673 }673 }
674 674
675 qint64 now = usecTimestampNow();675 qint64 now = usecTimestampNow();
676 float deltaTime = (float) (now - lastUpdate) / (float) USECS_PER_SECOND;
677 676
678 if (!_isFinished) {677 // we check for 'now' in the past in case people set their clock back
679 if (_wantSignals) {678 if (lastUpdate < now) {
680 emit update(deltaTime);679 float deltaTime = (float) (now - lastUpdate) / (float) USECS_PER_SECOND;
680 if (!_isFinished) {
681 if (_wantSignals) {
682 emit update(deltaTime);
683 }
681 }684 }
682 }685 }
683 lastUpdate = now;686 lastUpdate = now;