Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -180,8 +180,7 @@ EntityItemID EntityScriptingInterface::findClosestEntity(const glm::vec3& center · 179 unmodified lines | |||
| 180 | EntityItemID result(UNKNOWN_ENTITY_ID, UNKNOWN_ENTITY_TOKEN, false); | 180 | EntityItemID result(UNKNOWN_ENTITY_ID, UNKNOWN_ENTITY_TOKEN, false); |
| 181 | if (_entityTree) { | 181 | if (_entityTree) { |
| 182 | _entityTree->lockForRead(); | 182 | _entityTree->lockForRead(); |
| 183 | const EntityItem* closestEntity = _entityTree->findClosestEntity(center/(float)TREE_SCALE, | 183 | const EntityItem* closestEntity = _entityTree->findClosestEntity(center, radius); |
| 184 | radius/(float)TREE_SCALE); | ||
| 185 | _entityTree->unlock(); | 184 | _entityTree->unlock(); |
| 186 | if (closestEntity) { | 185 | if (closestEntity) { |
| 187 | result.id = closestEntity->getID(); | 186 | result.id = closestEntity->getID(); |