mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:58:59 +02:00
MyAvatar updates the entity-server about queryAACubes of children entities
This commit is contained in:
parent
ee42c1d7c8
commit
2e1727610e
1 changed files with 16 additions and 0 deletions
|
@ -50,6 +50,7 @@
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
#include "InterfaceLogging.h"
|
#include "InterfaceLogging.h"
|
||||||
#include "DebugDraw.h"
|
#include "DebugDraw.h"
|
||||||
|
#include "EntityEditPacketSender.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -352,6 +353,21 @@ void MyAvatar::simulate(float deltaTime) {
|
||||||
|
|
||||||
// consider updating our billboard
|
// consider updating our billboard
|
||||||
maybeUpdateBillboard();
|
maybeUpdateBillboard();
|
||||||
|
|
||||||
|
locationChanged();
|
||||||
|
// if a entity-child of this avatar has moved outside of its queryAACube, update the cube and tell the entity server.
|
||||||
|
forEachDescendant([&](SpatiallyNestablePointer object) {
|
||||||
|
if (object->computePuffedQueryAACube() && object->getNestableType() == NestableType::Entity) {
|
||||||
|
EntityItemPointer entity = std::static_pointer_cast<EntityItem>(object);
|
||||||
|
EntityEditPacketSender* packetSender = qApp->getEntityEditPacketSender();
|
||||||
|
if (packetSender) {
|
||||||
|
EntityItemProperties properties = entity->getProperties();
|
||||||
|
properties.setQueryAACubeDirty();
|
||||||
|
packetSender->queueEditEntityMessage(PacketType::EntityEdit, entity->getID(), properties);
|
||||||
|
entity->setLastBroadcast(usecTimestampNow());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::mat4 MyAvatar::getSensorToWorldMatrix() const {
|
glm::mat4 MyAvatar::getSensorToWorldMatrix() const {
|
||||||
|
|
Loading…
Reference in a new issue