mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 02:06:30 +02:00
Merge pull request #5291 from ZappoMan/waitToSendAllEdits
Allow Assignment Client scripts to do edits in their shutdown handler
This commit is contained in:
commit
cac239ad88
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