mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Fix script loading bug
This commit is contained in:
parent
3203e8c7c2
commit
07da0c5e9c
1 changed files with 4 additions and 4 deletions
|
@ -281,12 +281,12 @@ void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID
|
|||
}
|
||||
|
||||
void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const bool reload) {
|
||||
EntityScriptDetails details;
|
||||
if (_entityViewer.getTree() && !_shuttingDown && _entitiesScriptEngine &&
|
||||
_entitiesScriptEngine->getEntityScriptDetails(entityID, details)) {
|
||||
if (_entityViewer.getTree() && !_shuttingDown && _entitiesScriptEngine) {
|
||||
|
||||
EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID);
|
||||
if (entity && (details.scriptText != entity->getServerScripts() || reload)) {
|
||||
EntityScriptDetails details;
|
||||
bool notRunning = !_entitiesScriptEngine->getEntityScriptDetails(entityID, details);
|
||||
if (entity && (reload || notRunning || details.scriptText != entity->getServerScripts())) {
|
||||
QString scriptUrl = entity->getServerScripts();
|
||||
scriptUrl = ResourceManager::normalizeURL(scriptUrl);
|
||||
qDebug() << "Loading entity server script" << scriptUrl << "for" << entityID;
|
||||
|
|
Loading…
Reference in a new issue