mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-21 16:41:38 +02:00
_lastEdited can only increase or be reset
This commit is contained in:
parent
08263b2672
commit
3b8275c240
1 changed files with 6 additions and 4 deletions
|
@ -2707,10 +2707,12 @@ quint64 EntityItem::getLastEdited() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityItem::setLastEdited(quint64 lastEdited) {
|
void EntityItem::setLastEdited(quint64 lastEdited) {
|
||||||
withWriteLock([&] {
|
if (lastEdited == 0 || lastEdited > _lastEdited) {
|
||||||
_lastEdited = _lastUpdated = lastEdited;
|
withWriteLock([&] {
|
||||||
_changedOnServer = glm::max(lastEdited, _changedOnServer);
|
_lastEdited = _lastUpdated = lastEdited;
|
||||||
});
|
_changedOnServer = glm::max(lastEdited, _changedOnServer);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityItem::markAsChangedOnServer() {
|
void EntityItem::markAsChangedOnServer() {
|
||||||
|
|
Loading…
Reference in a new issue