Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 4 files). Show all
Unified · Split
| @@ -455,13 +455,13 @@ void EntityScriptServer::addingEntity(const EntityItemID& entityID) { · 454 unmodified lines | |||
| 455 | 455 | ||
| 456 | void EntityScriptServer::deletingEntity(const EntityItemID& entityID) { | 456 | void EntityScriptServer::deletingEntity(const EntityItemID& entityID) { |
| 457 | if (_entityViewer.getTree() && !_shuttingDown && _entitiesScriptEngine) { | 457 | if (_entityViewer.getTree() && !_shuttingDown && _entitiesScriptEngine) { |
| 458 | _entitiesScriptEngine->unloadEntityScript(entityID); | 458 | _entitiesScriptEngine->unloadEntityScript(entityID, true); |
| 459 | } | 459 | } |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID, const bool reload) { | 462 | void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID, const bool reload) { |
| 463 | if (_entityViewer.getTree() && !_shuttingDown) { | 463 | if (_entityViewer.getTree() && !_shuttingDown) { |
| 464 | _entitiesScriptEngine->unloadEntityScript(entityID); | 464 | _entitiesScriptEngine->unloadEntityScript(entityID, true); |
| 465 | checkAndCallPreload(entityID, reload); | 465 | checkAndCallPreload(entityID, reload); |
| 466 | } | 466 | } |
| 467 | } | 467 | } |