mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
include queryAABox in physics-induced sends
This commit is contained in:
parent
0500c21e00
commit
b83579e6e5
3 changed files with 7 additions and 2 deletions
|
@ -93,6 +93,7 @@ void AvatarData::nextAttitude(glm::vec3 position, glm::quat orientation) {
|
|||
bool success;
|
||||
Transform trans = getTransform(success);
|
||||
if (!success) {
|
||||
qDebug() << "Warning -- AvatarData::nextAttitude failed";
|
||||
return;
|
||||
}
|
||||
trans.setTranslation(position);
|
||||
|
|
|
@ -211,8 +211,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties&
|
|||
|
||||
bool updatedEntity = false;
|
||||
_entityTree->withWriteLock([&] {
|
||||
if (scriptSideProperties.parentDependentPropertyChanged() ||
|
||||
scriptSideProperties.parentIDChanged() || scriptSideProperties.parentJointIndexChanged()) {
|
||||
if (scriptSideProperties.parentRelatedPropertyChanged()) {
|
||||
// All of parentID, parentJointIndex, position, rotation are needed to make sense of any of them.
|
||||
// If any of these changed, pull any missing properties from the entity.
|
||||
EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID);
|
||||
|
|
|
@ -466,6 +466,11 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q
|
|||
properties.setActionData(_serverActionData);
|
||||
}
|
||||
|
||||
if (properties.parentRelatedPropertyChanged()) {
|
||||
// due to parenting, the server may not know where something is in world-space, so include the bounding cube.
|
||||
properties.setQueryAACube(_entity->getQueryAACube());
|
||||
}
|
||||
|
||||
// set the LastEdited of the properties but NOT the entity itself
|
||||
quint64 now = usecTimestampNow();
|
||||
properties.setLastEdited(now);
|
||||
|
|
Loading…
Reference in a new issue