mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:56:50 +02:00
don't make changes to other avatar's avatarEntities
This commit is contained in:
parent
b05ab1b17e
commit
144715f00c
2 changed files with 11 additions and 0 deletions
|
@ -284,6 +284,12 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties&
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
if (entity->getClientOnly() && entity->getOwningAvatarID() != nodeList->getSessionUUID()) {
|
||||||
|
// don't edit other avatar's avatarEntities
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (scriptSideProperties.parentRelatedPropertyChanged()) {
|
if (scriptSideProperties.parentRelatedPropertyChanged()) {
|
||||||
// All of parentID, parentJointIndex, position, rotation are needed to make sense of any of them.
|
// 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.
|
// If any of these changed, pull any missing properties from the entity.
|
||||||
|
|
|
@ -404,6 +404,11 @@ bool EntityMotionState::shouldSendUpdate(uint32_t simulationStep) {
|
||||||
assert(_body);
|
assert(_body);
|
||||||
assert(entityTreeIsLocked());
|
assert(entityTreeIsLocked());
|
||||||
|
|
||||||
|
if (_entity->getClientOnly() && _entity->getOwningAvatarID() != Physics::getSessionUUID()) {
|
||||||
|
// don't send updates for someone else's avatarEntities
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (_entity->actionDataNeedsTransmit()) {
|
if (_entity->actionDataNeedsTransmit()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue