History

Merge pull request #11009 from AndrewMeadows/fix-QueryAACube

update EntityItem bounding cube when on changed dimensions

Brad Hefta-Gaub committed 9 years ago

Commit d5725102 parents 9b3be6d 6b3860010 files · +86 −75Browse files

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

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+3−3
@@ -221,7 +221,7 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties · 220 unmodified lines
221221 _entityTree->withWriteLock([&] {
222222 EntityItemPointer entity = _entityTree->addEntity(id, propertiesWithSimID);
223223 if (entity) {
224− if (propertiesWithSimID.parentRelatedPropertyChanged()) {
224+ if (propertiesWithSimID.queryAACubeRelatedPropertyChanged()) {
225225 // due to parenting, the server may not know where something is in world-space, so include the bounding cube.
226226 bool success;
227227 AACube queryAACube = entity->getQueryAACube(success);
@@ -435,7 +435,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 207 unmodified lines
435435 entity->rememberHasSimulationOwnershipBid();
436436 }
437437 }
438− if (properties.parentRelatedPropertyChanged() && entity->computePuffedQueryAACube()) {
438+ if (properties.queryAACubeRelatedPropertyChanged()) {
439439 properties.setQueryAACube(entity->getQueryAACube());
440440 }
441441 entity->setLastBroadcast(usecTimestampNow());
@@ -445,7 +445,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 3 unmodified lines
445445 // if they've changed.
446446 entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
447447 if (descendant->getNestableType() == NestableType::Entity) {
448− if (descendant->computePuffedQueryAACube()) {
448+ if (descendant->checkAndMaybeUpdateQueryAACube()) {
449449 EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);
450450 EntityItemProperties newQueryCubeProperties;
451451 newQueryCubeProperties.setQueryAACube(descendant->getQueryAACube());