update EntityItem bounding cube when on changed dimensions
Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 10 files). Show all
Unified · Split
| @@ -221,7 +221,7 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties · 220 unmodified lines | ||
| 221 | 221 | _entityTree->withWriteLock([&] { |
| 222 | 222 | EntityItemPointer entity = _entityTree->addEntity(id, propertiesWithSimID); |
| 223 | 223 | if (entity) { |
| 224 | − if (propertiesWithSimID.parentRelatedPropertyChanged()) { | |
| 224 | + if (propertiesWithSimID.queryAACubeRelatedPropertyChanged()) { | |
| 225 | 225 | // due to parenting, the server may not know where something is in world-space, so include the bounding cube. |
| 226 | 226 | bool success; |
| 227 | 227 | AACube queryAACube = entity->getQueryAACube(success); |
| @@ -435,7 +435,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 207 unmodified lines | ||
| 435 | 435 | entity->rememberHasSimulationOwnershipBid(); |
| 436 | 436 | } |
| 437 | 437 | } |
| 438 | − if (properties.parentRelatedPropertyChanged() && entity->computePuffedQueryAACube()) { | |
| 438 | + if (properties.queryAACubeRelatedPropertyChanged()) { | |
| 439 | 439 | properties.setQueryAACube(entity->getQueryAACube()); |
| 440 | 440 | } |
| 441 | 441 | entity->setLastBroadcast(usecTimestampNow()); |
| @@ -445,7 +445,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 3 unmodified lines | ||
| 445 | 445 | // if they've changed. |
| 446 | 446 | entity->forEachDescendant([&](SpatiallyNestablePointer descendant) { |
| 447 | 447 | if (descendant->getNestableType() == NestableType::Entity) { |
| 448 | − if (descendant->computePuffedQueryAACube()) { | |
| 448 | + if (descendant->checkAndMaybeUpdateQueryAACube()) { | |
| 449 | 449 | EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant); |
| 450 | 450 | EntityItemProperties newQueryCubeProperties; |
| 451 | 451 | newQueryCubeProperties.setQueryAACube(descendant->getQueryAACube()); |