History

update with lastEditedCheck

Livi Erickson committed 8 years ago

Commit 70bbac52 parents 9f7b383 4e14eb31 file · +3 −0Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+3−0
@@ -338,6 +338,9 @@ QUuid EntityScriptingInterface::cloneEntity(QUuid entityIDToClone) { · 337 unmodified lines
338338 if (cloneAvatarEntity) {
339339 return addEntity(properties, true);
340340 } 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);
341344 bool success = addLocalEntityCopy(properties, newEntityID);
342345 if (success) {
343346 getEntityPacketSender()->queueCloneEntityMessage(entityIDToClone, newEntityID);