History

clear the entity viewer before restarting ESS script engine

Stephen Birarda committed 9 years ago

Commit f213b321 parent 4925b3c1 file · +4 −12Browse files

Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 1 file). Show all

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+4−12
@@ -324,16 +324,8 @@ void EntityScriptServer::nodeActivated(SharedNodePointer activatedNode) { · 323 unmodified lines
324void EntityScriptServer::nodeKilled(SharedNodePointer killedNode) {324void EntityScriptServer::nodeKilled(SharedNodePointer killedNode) {
325 switch (killedNode->getType()) {325 switch (killedNode->getType()) {
326 case NodeType::EntityServer: {326 case NodeType::EntityServer: {
327 if (!_shuttingDown) {327 clear();
328 if (_entitiesScriptEngine) {328
329 _entitiesScriptEngine->unloadAllEntityScripts();
330 _entitiesScriptEngine->stop();
331 }
332
333 resetEntitiesScriptEngine();
334
335 _entityViewer.clear();
336 }
337 break;329 break;
338 }330 }
339 case NodeType::Agent: {331 case NodeType::Agent: {
@@ -440,12 +432,12 @@ void EntityScriptServer::clear() { · 100 unmodified lines
440 _entitiesScriptEngine->stop();432 _entitiesScriptEngine->stop();
441 }433 }
442 434
435 _entityViewer.clear();
436
443 // reset the engine437 // reset the engine
444 if (!_shuttingDown) {438 if (!_shuttingDown) {
445 resetEntitiesScriptEngine();439 resetEntitiesScriptEngine();
446 }440 }
447
448 _entityViewer.clear();
449}441}
450 442
451void EntityScriptServer::shutdownScriptEngine() {443void EntityScriptServer::shutdownScriptEngine() {