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