mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
fix bug in getContainingElement() found by andrew, allow sciprting interface to return properties of local only entities
This commit is contained in:
parent
756840d541
commit
76511762dc
2 changed files with 2 additions and 8 deletions
|
@ -64,10 +64,6 @@ EntityItemID EntityScriptingInterface::identifyEntity(EntityItemID entityID) {
|
|||
EntityItemProperties EntityScriptingInterface::getEntityProperties(EntityItemID entityID) {
|
||||
EntityItemProperties results;
|
||||
EntityItemID identity = identifyEntity(entityID);
|
||||
if (!identity.isKnownID) {
|
||||
results.setIsUnknownID();
|
||||
return results;
|
||||
}
|
||||
if (_entityTree) {
|
||||
_entityTree->lockForRead();
|
||||
EntityItem* entity = const_cast<EntityItem*>(_entityTree->findEntityByEntityItemID(identity));
|
||||
|
|
|
@ -953,11 +953,9 @@ EntityTreeElement* EntityTree::getContainingElement(const EntityItemID& entityIt
|
|||
creatorTokenOnly.id = UNKNOWN_ENTITY_ID;
|
||||
creatorTokenOnly.creatorTokenID = entityItemID.creatorTokenID;
|
||||
creatorTokenOnly.isKnownID = false;
|
||||
|
||||
if (_entityToElementMap.contains(entityItemID)) {
|
||||
return _entityToElementMap.value(entityItemID);
|
||||
if (_entityToElementMap.contains(creatorTokenOnly)) {
|
||||
return _entityToElementMap.value(creatorTokenOnly);
|
||||
}
|
||||
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue