mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
cleanups
This commit is contained in:
parent
76df582a6c
commit
c84fa5f821
3 changed files with 4 additions and 4 deletions
|
@ -281,7 +281,6 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties&
|
|||
|
||||
// if we've moved an entity with children, check/update the queryAACube of all descendents and tell the server
|
||||
// if they've changed.
|
||||
// TODO -- ancestors of this entity may also need to expand their queryAACubes.
|
||||
entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
|
||||
if (descendant->getNestableType() == NestableType::Entity) {
|
||||
EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);
|
||||
|
|
|
@ -513,7 +513,6 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q
|
|||
|
||||
// if we've moved an entity with children, check/update the queryAACube of all descendents and tell the server
|
||||
// if they've changed.
|
||||
// TODO -- ancestors of this entity may also need to expand their queryAACubes.
|
||||
_entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
|
||||
if (descendant->getNestableType() == NestableType::Entity) {
|
||||
EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include "DependencyManager.h"
|
||||
#include "SpatiallyNestable.h"
|
||||
|
||||
const float defaultAACubeSize = 1.0f;
|
||||
|
||||
SpatiallyNestable::SpatiallyNestable(NestableType nestableType, QUuid id) :
|
||||
_nestableType(nestableType),
|
||||
_id(id),
|
||||
|
@ -539,7 +541,7 @@ void SpatiallyNestable::locationChanged() {
|
|||
}
|
||||
|
||||
AACube SpatiallyNestable::getMaximumAACube(bool& success) const {
|
||||
return AACube(getPosition(success) - glm::vec3(0.5f), 1.0f); // XXX
|
||||
return AACube(getPosition(success) - glm::vec3(defaultAACubeSize / 2.0f), defaultAACubeSize);
|
||||
}
|
||||
|
||||
void SpatiallyNestable::setQueryAACube(const AACube& queryAACube) {
|
||||
|
@ -607,7 +609,7 @@ AACube SpatiallyNestable::getQueryAACube(bool& success) const {
|
|||
return _queryAACube;
|
||||
}
|
||||
success = false;
|
||||
return AACube(getPosition(success) - glm::vec3(0.5f), 1.0f); // XXX
|
||||
return AACube(getPosition(success) - glm::vec3(defaultAACubeSize / 2.0f), defaultAACubeSize);
|
||||
}
|
||||
|
||||
AACube SpatiallyNestable::getQueryAACube() const {
|
||||
|
|
Loading…
Reference in a new issue