History

how did these happen

unknown committed 7 years ago

Commit dde7fbd1 parent f8f13e93 files · +10 −67Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 3 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+0−31
@@ -1193,12 +1193,6 @@ QVector<QUuid> EntityScriptingInterface::findEntitiesByType(const QString entity · 1192 unmodified lines
1193 _entityTree->withReadLock([&] {1193 _entityTree->withReadLock([&] {
1194 _entityTree->evalEntitiesInSphereWithType(center, radius, type, PickFilter(searchFilter), result);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 return result;1197 return result;
1204}1198}
@@ -1210,24 +1204,6 @@ QVector<QUuid> EntityScriptingInterface::findEntitiesByName(const QString entity · 5 unmodified lines
1210 unsigned int searchFilter = PickFilter::getBitMask(PickFilter::FlagBit::DOMAIN_ENTITIES) | PickFilter::getBitMask(PickFilter::FlagBit::AVATAR_ENTITIES);1204 unsigned int searchFilter = PickFilter::getBitMask(PickFilter::FlagBit::DOMAIN_ENTITIES) | PickFilter::getBitMask(PickFilter::FlagBit::AVATAR_ENTITIES);
1211 _entityTree->evalEntitiesInSphereWithName(center, radius, entityName, caseSensitiveSearch, PickFilter(searchFilter), result);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 return result;1208 return result;
1233}1209}
@@ -1262,13 +1238,6 @@ RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionVecto · 28 unmodified lines
1262 return evalRayIntersectionWorker(ray, Octree::Lock, searchFilter, entityIdsToInclude, entityIdsToDiscard);1238 return evalRayIntersectionWorker(ray, Octree::Lock, searchFilter, entityIdsToInclude, entityIdsToDiscard);
1263}1239}
1264 1240
1265RayToEntityIntersectionResult 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
1272RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionWorker(const PickRay& ray,1241RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionWorker(const PickRay& ray,
1273 Octree::lockType lockType, PickFilter searchFilter, const QVector<EntityItemID>& entityIdsToInclude,1242 Octree::lockType lockType, PickFilter searchFilter, const QVector<EntityItemID>& entityIdsToInclude,
1274 const QVector<EntityItemID>& entityIdsToDiscard) const {1243 const QVector<EntityItemID>& entityIdsToDiscard) const {