History

make sure to flush edit queue on script shutdown

ZappoMan committed 12 years ago

Commit 3b175501 parent a6934603 files · +30 −24Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 3 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+21−0
@@ -261,6 +261,27 @@ void ScriptEngine::run() { · 260 unmodified lines
261 }261 }
262 }262 }
263 emit scriptEnding();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 cleanMenuItems();285 cleanMenuItems();
265 286
266 // If we were on a thread, then wait till it's done287 // If we were on a thread, then wait till it's done