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