History

add parameter to unload to remove entityID from map

Stephen Birarda committed 9 years ago

Commit 0c657a11 parent 546f3244 files · +14 −17Browse files

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

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+2−2
@@ -455,13 +455,13 @@ void EntityScriptServer::addingEntity(const EntityItemID& entityID) { · 454 unmodified lines
455 455
456void EntityScriptServer::deletingEntity(const EntityItemID& entityID) {456void 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
462void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID, const bool reload) {462void 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}