From 9d131a654795826cf66d438328a72096333f57fb Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 27 Feb 2018 19:53:54 -0800 Subject: [PATCH 1/2] if a node can't change locks, don't allow them to create an already-locked entity --- libraries/entities/src/EntityTree.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index ef19375e4a..e5c96d0393 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -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; -} \ No newline at end of file +} From 31115b3cb6a350dc0c7bd26dca5b32c58977c7cc Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 27 Feb 2018 20:14:00 -0800 Subject: [PATCH 2/2] make sure rezzer doesn't ignore adjustment --- libraries/entities/src/EntityTree.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index e5c96d0393..c3b4716ccf 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -1511,6 +1511,7 @@ 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); + bumpTimestamp(properties); } // If we got a valid edit packet, then it could be a new entity or it could be an update to