Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 28 files). Show all
Unified · Split
| @@ -364,6 +364,16 @@ void ScriptEngine::run() { · 363 unmodified lines | ||
| 364 | 364 | } |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | + if (_modelsScriptingInterface.getModelPacketSender()->serversExist()) { | |
| 368 | + // release the queue of edit voxel messages. | |
| 369 | + _modelsScriptingInterface.getModelPacketSender()->releaseQueuedMessages(); | |
| 370 | + | |
| 371 | + // since we're in non-threaded mode, call process so that the packets are sent | |
| 372 | + if (!_modelsScriptingInterface.getModelPacketSender()->isThreaded()) { | |
| 373 | + _modelsScriptingInterface.getModelPacketSender()->process(); | |
| 374 | + } | |
| 375 | + } | |
| 376 | + | |
| 367 | 377 | if (_isAvatar && _avatarData) { |
| 368 | 378 | |
| 369 | 379 | const int SCRIPT_AUDIO_BUFFER_SAMPLES = floor(((SCRIPT_DATA_CALLBACK_USECS * SAMPLE_RATE) / (1000 * 1000)) + 0.5); |
| @@ -475,6 +485,22 @@ void ScriptEngine::run() { · 105 unmodified lines | ||
| 475 | 485 | } |
| 476 | 486 | } |
| 477 | 487 | |
| 488 | +qDebug() << "ScriptEngine::run()... checking for model server... _modelsScriptingInterface.getModelPacketSender()=" << _modelsScriptingInterface.getModelPacketSender(); | |
| 489 | +qDebug() << "ScriptEngine::run()... checking for model server... _modelsScriptingInterface.getModelPacketSender()->serversExist()=" << _modelsScriptingInterface.getModelPacketSender()->serversExist(); | |
| 490 | + | |
| 491 | + if (_modelsScriptingInterface.getModelPacketSender()->serversExist()) { | |
| 492 | + | |
| 493 | +qDebug() << "ScriptEngine::run()... calling _modelsScriptingInterface.getModelPacketSender()->releaseQueuedMessages();"; | |
| 494 | + | |
| 495 | + // release the queue of edit voxel messages. | |
| 496 | + _modelsScriptingInterface.getModelPacketSender()->releaseQueuedMessages(); | |
| 497 | + | |
| 498 | + // since we're in non-threaded mode, call process so that the packets are sent | |
| 499 | + if (!_modelsScriptingInterface.getModelPacketSender()->isThreaded()) { | |
| 500 | + _modelsScriptingInterface.getModelPacketSender()->process(); | |
| 501 | + } | |
| 502 | + } | |
| 503 | + | |
| 478 | 504 | // If we were on a thread, then wait till it's done |
| 479 | 505 | if (thread()) { |
| 480 | 506 | thread()->quit(); |