Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 3 files). Show all
Unified · Split
| @@ -261,6 +261,27 @@ void ScriptEngine::run() { · 260 unmodified lines | ||
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | emit scriptEnding(); |
| 264 | + | |
| 265 | + if (_voxelsScriptingInterface.getVoxelPacketSender()->serversExist()) { | |
| 266 | + // release the queue of edit voxel messages. | |
| 267 | + _voxelsScriptingInterface.getVoxelPacketSender()->releaseQueuedMessages(); | |
| 268 | + | |
| 269 | + // since we're in non-threaded mode, call process so that the packets are sent | |
| 270 | + if (!_voxelsScriptingInterface.getVoxelPacketSender()->isThreaded()) { | |
| 271 | + _voxelsScriptingInterface.getVoxelPacketSender()->process(); | |
| 272 | + } | |
| 273 | + } | |
| 274 | + | |
| 275 | + if (_particlesScriptingInterface.getParticlePacketSender()->serversExist()) { | |
| 276 | + // release the queue of edit voxel messages. | |
| 277 | + _particlesScriptingInterface.getParticlePacketSender()->releaseQueuedMessages(); | |
| 278 | + | |
| 279 | + // since we're in non-threaded mode, call process so that the packets are sent | |
| 280 | + if (!_particlesScriptingInterface.getParticlePacketSender()->isThreaded()) { | |
| 281 | + _particlesScriptingInterface.getParticlePacketSender()->process(); | |
| 282 | + } | |
| 283 | + } | |
| 284 | + | |
| 264 | 285 | cleanMenuItems(); |
| 265 | 286 | |
| 266 | 287 | // If we were on a thread, then wait till it's done |