Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -386,6 +386,15 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 385 unmodified lines | |||
| 386 | } | 386 | } |
| 387 | }); | 387 | }); |
| 388 | 388 | ||
| 389 | // FIXME: We need to figure out a better way to handle this. Allowing these edits to go through potentially | ||
| 390 | // breaks avatar energy and entities that are parented. | ||
| 391 | // | ||
| 392 | // To handle cases where a script needs to edit an entity with a _known_ entity id but doesn't exist | ||
| 393 | // in the local entity tree, we need to allow those edits to go through to the server. | ||
| 394 | // if (!updatedEntity) { | ||
| 395 | // return QUuid(); | ||
| 396 | // } | ||
| 397 | |||
| 389 | _entityTree->withReadLock([&] { | 398 | _entityTree->withReadLock([&] { |
| 390 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID); | 399 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID); |
| 391 | if (entity) { | 400 | if (entity) { |