mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 09:57:51 +02:00
when adding or editing an entity from a script, make the _lastEdited in the transmitted properties be the same as the one in the Entity in the local tree
This commit is contained in:
parent
03b55e6a64
commit
2fd38c1585
2 changed files with 3 additions and 1 deletions
|
@ -179,6 +179,7 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties
|
|||
}
|
||||
|
||||
entity->setLastBroadcast(usecTimestampNow());
|
||||
propertiesWithSimID.setLastEdited(entity->getLastEdited());
|
||||
} else {
|
||||
qCDebug(entities) << "script failed to add new Entity to local Octree";
|
||||
success = false;
|
||||
|
@ -376,6 +377,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties&
|
|||
properties.setQueryAACube(entity->getQueryAACube());
|
||||
}
|
||||
entity->setLastBroadcast(usecTimestampNow());
|
||||
properties.setLastEdited(entity->getLastEdited());
|
||||
|
||||
// if we've moved an entity with children, check/update the queryAACube of all descendents and tell the server
|
||||
// if they've changed.
|
||||
|
|
|
@ -898,7 +898,7 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c
|
|||
entityItemID, properties);
|
||||
endDecode = usecTimestampNow();
|
||||
|
||||
const quint64 LAST_EDITED_SERVERSIDE_BUMP = 10000; // usec
|
||||
const quint64 LAST_EDITED_SERVERSIDE_BUMP = 1; // usec
|
||||
if (!senderNode->getCanRez() && senderNode->getCanRezTmp()) {
|
||||
// this node is only allowed to rez temporary entities. if need be, cap the lifetime.
|
||||
if (properties.getLifetime() == ENTITY_ITEM_IMMORTAL_LIFETIME ||
|
||||
|
|
Loading…
Reference in a new issue