History

Use Huffman's version of getEntityScriptDetails

Atlante45 committed 9 years ago

Commit 3203e8c1 parent 20a82df4 files · +4 −11Browse 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+3−2
@@ -281,8 +281,9 @@ void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID · 280 unmodified lines
281}281}
282 282
283void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const bool reload) {283void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const bool reload) {
284 if (_entityViewer.getTree() && !_shuttingDown && _entitiesScriptEngine) {284 EntityScriptDetails details;
285 auto details = _entitiesScriptEngine->getEntityScriptDetails(entityID);285 if (_entityViewer.getTree() && !_shuttingDown && _entitiesScriptEngine &&
286 _entitiesScriptEngine->getEntityScriptDetails(entityID, details)) {
286 287
287 EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID);288 EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID);
288 if (entity && (details.scriptText != entity->getServerScripts() || reload)) {289 if (entity && (details.scriptText != entity->getServerScripts() || reload)) {