Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 110 files). Show all
Unified · Split
| @@ -70,9 +70,10 @@ EntityItemProperties EntityScriptingInterface::getEntityProperties(EntityItemID · 69 unmodified lines | |||
| 70 | } | 70 | } |
| 71 | if (_entityTree) { | 71 | if (_entityTree) { |
| 72 | _entityTree->lockForRead(); | 72 | _entityTree->lockForRead(); |
| 73 | const EntityItem* model = _entityTree->findEntityByID(identity.id, true); | 73 | EntityItem* entity = const_cast<EntityItem*>(_entityTree->findEntityByID(identity.id, true)); |
| 74 | if (model) { | 74 | if (entity) { |
| 75 | results = model->getProperties(); | 75 | entity->setSittingPoints(_entityTree->getGeometryForEntity(*entity)->sittingPoints); |
| 76 | results = entity->getProperties(); | ||
| 76 | } else { | 77 | } else { |
| 77 | results.setIsUnknownID(); | 78 | results.setIsUnknownID(); |
| 78 | } | 79 | } |