Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 100 files). Show all
Unified · Split
| @@ -710,7 +710,13 @@ void ScriptEngine::run() { · 709 unmodified lines | |||
| 710 | 710 | ||
| 711 | // since we're in non-threaded mode, call process so that the packets are sent | 711 | // since we're in non-threaded mode, call process so that the packets are sent |
| 712 | if (!entityScriptingInterface->getEntityPacketSender()->isThreaded()) { | 712 | if (!entityScriptingInterface->getEntityPacketSender()->isThreaded()) { |
| 713 | entityScriptingInterface->getEntityPacketSender()->process(); | 713 | // wait here till the edit packet sender is completely done sending |
| 714 | while (entityScriptingInterface->getEntityPacketSender()->hasPacketsToSend()) { | ||
| 715 | entityScriptingInterface->getEntityPacketSender()->process(); | ||
| 716 | QCoreApplication::processEvents(); | ||
| 717 | } | ||
| 718 | } else { | ||
| 719 | // FIXME - do we need to have a similar "wait here" loop for non-threaded packet senders? | ||
| 714 | } | 720 | } |
| 715 | } | 721 | } |
| 716 | 722 | ||