mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 11:46:34 +02:00
clear the entity viewer before restarting ESS script engine
This commit is contained in:
parent
4925b3c47c
commit
f213b32167
1 changed files with 4 additions and 12 deletions
|
@ -324,16 +324,8 @@ void EntityScriptServer::nodeActivated(SharedNodePointer activatedNode) {
|
|||
void EntityScriptServer::nodeKilled(SharedNodePointer killedNode) {
|
||||
switch (killedNode->getType()) {
|
||||
case NodeType::EntityServer: {
|
||||
if (!_shuttingDown) {
|
||||
if (_entitiesScriptEngine) {
|
||||
_entitiesScriptEngine->unloadAllEntityScripts();
|
||||
_entitiesScriptEngine->stop();
|
||||
}
|
||||
|
||||
resetEntitiesScriptEngine();
|
||||
|
||||
_entityViewer.clear();
|
||||
}
|
||||
clear();
|
||||
|
||||
break;
|
||||
}
|
||||
case NodeType::Agent: {
|
||||
|
@ -440,12 +432,12 @@ void EntityScriptServer::clear() {
|
|||
_entitiesScriptEngine->stop();
|
||||
}
|
||||
|
||||
_entityViewer.clear();
|
||||
|
||||
// reset the engine
|
||||
if (!_shuttingDown) {
|
||||
resetEntitiesScriptEngine();
|
||||
}
|
||||
|
||||
_entityViewer.clear();
|
||||
}
|
||||
|
||||
void EntityScriptServer::shutdownScriptEngine() {
|
||||
|
|
Loading…
Reference in a new issue