Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1193,12 +1193,6 @@ QVector<QUuid> EntityScriptingInterface::findEntitiesByType(const QString entity · 1192 unmodified lines | ||
| 1193 | 1193 | _entityTree->withReadLock([&] { |
| 1194 | 1194 | _entityTree->evalEntitiesInSphereWithType(center, radius, type, PickFilter(searchFilter), result); |
| 1195 | 1195 | }); |
| 1196 | − | |
| 1197 | − foreach(EntityItemPointer entity, entities) { | |
| 1198 | − if (entity->getType() == type) { | |
| 1199 | − result << entity->getEntityItemID().toString(); | |
| 1200 | − } | |
| 1201 | − } | |
| 1202 | 1196 | } |
| 1203 | 1197 | return result; |
| 1204 | 1198 | } |
| @@ -1210,24 +1204,6 @@ QVector<QUuid> EntityScriptingInterface::findEntitiesByName(const QString entity · 5 unmodified lines | ||
| 1210 | 1204 | unsigned int searchFilter = PickFilter::getBitMask(PickFilter::FlagBit::DOMAIN_ENTITIES) | PickFilter::getBitMask(PickFilter::FlagBit::AVATAR_ENTITIES); |
| 1211 | 1205 | _entityTree->evalEntitiesInSphereWithName(center, radius, entityName, caseSensitiveSearch, PickFilter(searchFilter), result); |
| 1212 | 1206 | }); |
| 1213 | − | |
| 1214 | − if (caseSensitiveSearch) { | |
| 1215 | − foreach(EntityItemPointer entity, entities) { | |
| 1216 | − if (entity->getName() == entityName) { | |
| 1217 | − result << entity->getEntityItemID(); | |
| 1218 | − } | |
| 1219 | − } | |
| 1220 | − | |
| 1221 | − } else { | |
| 1222 | − QString entityNameLowerCase = entityName.toLower(); | |
| 1223 | − | |
| 1224 | − foreach(EntityItemPointer entity, entities) { | |
| 1225 | − QString entityItemLowerCase = entity->getName().toLower(); | |
| 1226 | − if (entityItemLowerCase == entityNameLowerCase) { | |
| 1227 | − result << entity->getEntityItemID(); | |
| 1228 | − } | |
| 1229 | − } | |
| 1230 | − } | |
| 1231 | 1207 | } |
| 1232 | 1208 | return result; |
| 1233 | 1209 | } |
| @@ -1262,13 +1238,6 @@ RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionVecto · 28 unmodified lines | ||
| 1262 | 1238 | return evalRayIntersectionWorker(ray, Octree::Lock, searchFilter, entityIdsToInclude, entityIdsToDiscard); |
| 1263 | 1239 | } |
| 1264 | 1240 | |
| 1265 | −RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionVector(const PickRay& ray, PickFilter searchFilter, | |
| 1266 | − const QVector<EntityItemID>& entityIdsToInclude, const QVector<EntityItemID>& entityIdsToDiscard) { | |
| 1267 | − PROFILE_RANGE(script_entities, __FUNCTION__); | |
| 1268 | − | |
| 1269 | − return evalRayIntersectionWorker(ray, Octree::Lock, searchFilter, entityIdsToInclude, entityIdsToDiscard); | |
| 1270 | −} | |
| 1271 | − | |
| 1272 | 1241 | RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionWorker(const PickRay& ray, |
| 1273 | 1242 | Octree::lockType lockType, PickFilter searchFilter, const QVector<EntityItemID>& entityIdsToInclude, |
| 1274 | 1243 | const QVector<EntityItemID>& entityIdsToDiscard) const { |