Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -204,8 +204,7 @@ EntityItemID EntityScriptingInterface::findClosestEntity(const glm::vec3& center · 203 unmodified lines | ||
| 204 | 204 | const EntityItem* closestEntity = _entityTree->findClosestEntity(center, radius); |
| 205 | 205 | _entityTree->unlock(); |
| 206 | 206 | if (closestEntity) { |
| 207 | − result.id = closestEntity->getID(); | |
| 208 | − result.isKnownID = true; | |
| 207 | + result = closestEntity->getEntityItemID(); | |
| 209 | 208 | } |
| 210 | 209 | } |
| 211 | 210 | return result; |
| @@ -229,8 +228,7 @@ QVector<EntityItemID> EntityScriptingInterface::findEntities(const glm::vec3& ce · 17 unmodified lines | ||
| 229 | 228 | _entityTree->unlock(); |
| 230 | 229 | |
| 231 | 230 | foreach (const EntityItem* entity, entities) { |
| 232 | − EntityItemID thisEntityItemID(entity->getID(), UNKNOWN_ENTITY_TOKEN, true); | |
| 233 | − result << thisEntityItemID; | |
| 231 | + result << entity->getEntityItemID(); | |
| 234 | 232 | } |
| 235 | 233 | } |
| 236 | 234 | return result; |
| @@ -246,8 +244,7 @@ QVector<EntityItemID> EntityScriptingInterface::findEntitiesInBox(const glm::vec · 9 unmodified lines | ||
| 246 | 244 | _entityTree->unlock(); |
| 247 | 245 | |
| 248 | 246 | foreach (const EntityItem* entity, entities) { |
| 249 | − EntityItemID thisEntityItemID(entity->getID(), UNKNOWN_ENTITY_TOKEN, true); | |
| 250 | − result << thisEntityItemID; | |
| 247 | + result << entity->getEntityItemID(); | |
| 251 | 248 | } |
| 252 | 249 | } |
| 253 | 250 | return result; |