Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -338,6 +338,9 @@ QUuid EntityScriptingInterface::cloneEntity(QUuid entityIDToClone) { · 337 unmodified lines | ||
| 338 | 338 | if (cloneAvatarEntity) { |
| 339 | 339 | return addEntity(properties, true); |
| 340 | 340 | } else { |
| 341 | + // setLastEdited timestamp to 0 to ensure this entity gets updated with the properties | |
| 342 | + // from the server-created entity, don't change this unless you know what you are doing | |
| 343 | + properties.setLastEdited(0); | |
| 341 | 344 | bool success = addLocalEntityCopy(properties, newEntityID); |
| 342 | 345 | if (success) { |
| 343 | 346 | getEntityPacketSender()->queueCloneEntityMessage(entityIDToClone, newEntityID); |