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