Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 4 files). Show all
Unified · Split
| @@ -281,8 +281,9 @@ void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID · 280 unmodified lines | ||
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const bool reload) { |
| 284 | − if (_entityViewer.getTree() && !_shuttingDown && _entitiesScriptEngine) { | |
| 285 | − auto details = _entitiesScriptEngine->getEntityScriptDetails(entityID); | |
| 284 | + EntityScriptDetails details; | |
| 285 | + if (_entityViewer.getTree() && !_shuttingDown && _entitiesScriptEngine && | |
| 286 | + _entitiesScriptEngine->getEntityScriptDetails(entityID, details)) { | |
| 286 | 287 | |
| 287 | 288 | EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID); |
| 288 | 289 | if (entity && (details.scriptText != entity->getServerScripts() || reload)) { |