Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -837,9 +837,8 @@ bool EntityScriptingInterface::setAbsoluteJointTranslationInObjectFrame(const QU · 836 unmodified lines | ||
| 837 | 837 | bool result = modelEntity->setAbsoluteJointTranslationInObjectFrame(jointIndex, translation); |
| 838 | 838 | if (result) { |
| 839 | 839 | EntityItemProperties properties; |
| 840 | − _entityTree->withReadLock([&] { | |
| 840 | + _entityTree->withWriteLock([&] { | |
| 841 | 841 | properties = entity->getProperties(); |
| 842 | − entity->setLastEdited(now); | |
| 843 | 842 | entity->setLastBroadcast(now); |
| 844 | 843 | }); |
| 845 | 844 | |
| @@ -860,9 +859,8 @@ bool EntityScriptingInterface::setAbsoluteJointRotationInObjectFrame(const QUuid · 14 unmodified lines | ||
| 860 | 859 | bool result = modelEntity->setAbsoluteJointRotationInObjectFrame(jointIndex, rotation); |
| 861 | 860 | if (result) { |
| 862 | 861 | EntityItemProperties properties; |
| 863 | − _entityTree->withReadLock([&] { | |
| 862 | + _entityTree->withWriteLock([&] { | |
| 864 | 863 | properties = entity->getProperties(); |
| 865 | − entity->setLastEdited(now); | |
| 866 | 864 | entity->setLastBroadcast(now); |
| 867 | 865 | }); |
| 868 | 866 | |