mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:56:29 +02:00
accept changes with the same Edit timestamp
This commit is contained in:
parent
e36ee2a961
commit
1e5c44f117
1 changed files with 2 additions and 5 deletions
|
@ -109,9 +109,6 @@ EntityItem::EntityItem(const EntityItemID& entityItemID, const EntityItemPropert
|
||||||
_changedOnServer = 0;
|
_changedOnServer = 0;
|
||||||
initFromEntityItemID(entityItemID);
|
initFromEntityItemID(entityItemID);
|
||||||
setProperties(properties, true); // force copy
|
setProperties(properties, true); // force copy
|
||||||
if (_lastEdited == 0) {
|
|
||||||
_lastEdited = _created;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityPropertyFlags EntityItem::getEntityProperties(EncodeBitstreamParams& params) const {
|
EntityPropertyFlags EntityItem::getEntityProperties(EncodeBitstreamParams& params) const {
|
||||||
|
@ -424,14 +421,14 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
|
||||||
if (fromSameServerEdit) {
|
if (fromSameServerEdit) {
|
||||||
// If this is from the same sever packet, then check against any local changes since we got
|
// If this is from the same sever packet, then check against any local changes since we got
|
||||||
// the most recent packet from this server time
|
// the most recent packet from this server time
|
||||||
if (_lastEdited >= _lastEditedFromRemote) {
|
if (_lastEdited > _lastEditedFromRemote) {
|
||||||
ignoreServerPacket = true;
|
ignoreServerPacket = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If this isn't from the same sever packet, then honor our skew adjusted times...
|
// If this isn't from the same sever packet, then honor our skew adjusted times...
|
||||||
// If we've changed our local tree more recently than the new data from this packet
|
// If we've changed our local tree more recently than the new data from this packet
|
||||||
// then we will not be changing our values, instead we just read and skip the data
|
// then we will not be changing our values, instead we just read and skip the data
|
||||||
if (_lastEdited >= lastEditedFromBufferAdjusted) {
|
if (_lastEdited > lastEditedFromBufferAdjusted) {
|
||||||
ignoreServerPacket = true;
|
ignoreServerPacket = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue