mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:23:36 +02:00
on script shutdown, wait to process all pending edit messages before ending the script engine
This commit is contained in:
parent
c4911dbbd4
commit
a8a4c99529
1 changed files with 7 additions and 1 deletions
|
@ -710,7 +710,13 @@ void ScriptEngine::run() {
|
|||
|
||||
// since we're in non-threaded mode, call process so that the packets are sent
|
||||
if (!entityScriptingInterface->getEntityPacketSender()->isThreaded()) {
|
||||
entityScriptingInterface->getEntityPacketSender()->process();
|
||||
// wait here till the edit packet sender is completely done sending
|
||||
while (entityScriptingInterface->getEntityPacketSender()->hasPacketsToSend()) {
|
||||
entityScriptingInterface->getEntityPacketSender()->process();
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
} else {
|
||||
// FIXME - do we need to have a similar "wait here" loop for non-threaded packet senders?
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue