Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 122 files). Show all
Unified · Split
| @@ -524,8 +524,6 @@ void ScriptEngine::run() { · 523 unmodified lines | |||
| 524 | 524 | ||
| 525 | qint64 now = usecTimestampNow(); | 525 | qint64 now = usecTimestampNow(); |
| 526 | float deltaTime = (float) (now - lastUpdate) / (float) USECS_PER_SECOND; | 526 | float deltaTime = (float) (now - lastUpdate) / (float) USECS_PER_SECOND; |
| 527 | emit update(deltaTime); | ||
| 528 | lastUpdate = now; | ||
| 529 | 527 | ||
| 530 | if (_engine.hasUncaughtException()) { | 528 | if (_engine.hasUncaughtException()) { |
| 531 | int line = _engine.uncaughtExceptionLineNumber(); | 529 | int line = _engine.uncaughtExceptionLineNumber(); |
| @@ -533,6 +531,9 @@ void ScriptEngine::run() { · 1 unmodified line | |||
| 533 | emit errorMessage("Uncaught exception at (" + _fileNameString + ") line" + QString::number(line) + ":" + _engine.uncaughtException().toString()); | 531 | emit errorMessage("Uncaught exception at (" + _fileNameString + ") line" + QString::number(line) + ":" + _engine.uncaughtException().toString()); |
| 534 | _engine.clearExceptions(); | 532 | _engine.clearExceptions(); |
| 535 | } | 533 | } |
| 534 | |||
| 535 | emit update(deltaTime); | ||
| 536 | lastUpdate = now; | ||
| 536 | } | 537 | } |
| 537 | emit scriptEnding(); | 538 | emit scriptEnding(); |
| 538 | 539 | ||