mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 04:03:59 +02:00
fix locking
This commit is contained in:
parent
c9ed36f9a6
commit
2147b0d78e
1 changed files with 2 additions and 4 deletions
|
@ -837,9 +837,8 @@ bool EntityScriptingInterface::setAbsoluteJointTranslationInObjectFrame(const QU
|
|||
bool result = modelEntity->setAbsoluteJointTranslationInObjectFrame(jointIndex, translation);
|
||||
if (result) {
|
||||
EntityItemProperties properties;
|
||||
_entityTree->withReadLock([&] {
|
||||
_entityTree->withWriteLock([&] {
|
||||
properties = entity->getProperties();
|
||||
entity->setLastEdited(now);
|
||||
entity->setLastBroadcast(now);
|
||||
});
|
||||
|
||||
|
@ -860,9 +859,8 @@ bool EntityScriptingInterface::setAbsoluteJointRotationInObjectFrame(const QUuid
|
|||
bool result = modelEntity->setAbsoluteJointRotationInObjectFrame(jointIndex, rotation);
|
||||
if (result) {
|
||||
EntityItemProperties properties;
|
||||
_entityTree->withReadLock([&] {
|
||||
_entityTree->withWriteLock([&] {
|
||||
properties = entity->getProperties();
|
||||
entity->setLastEdited(now);
|
||||
entity->setLastBroadcast(now);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue