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