mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
if a node can't change locks, don't allow them to create an already-locked entity
This commit is contained in:
parent
6bf1c9878f
commit
9d131a6547
1 changed files with 6 additions and 1 deletions
|
@ -1508,6 +1508,11 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c
|
|||
}
|
||||
}
|
||||
|
||||
if (isAdd && properties.getLocked() && !senderNode->isAllowedEditor()) {
|
||||
// if a node can't change locks, don't allow them to create an already-locked entity
|
||||
properties.setLocked(false);
|
||||
}
|
||||
|
||||
// If we got a valid edit packet, then it could be a new entity or it could be an update to
|
||||
// an existing entity... handle appropriately
|
||||
if (validEditPacket) {
|
||||
|
@ -2470,4 +2475,4 @@ bool EntityTree::removeMaterialFromOverlay(const QUuid& overlayID, graphics::Mat
|
|||
return _removeMaterialFromOverlayOperator(overlayID, material, parentMaterialName);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue