mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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) {
|
||||
withWriteLock([&] {
|
||||
_lastEdited = _lastUpdated = lastEdited;
|
||||
_changedOnServer = glm::max(lastEdited, _changedOnServer);
|
||||
});
|
||||
if (lastEdited == 0 || lastEdited > _lastEdited) {
|
||||
withWriteLock([&] {
|
||||
_lastEdited = _lastUpdated = lastEdited;
|
||||
_changedOnServer = glm::max(lastEdited, _changedOnServer);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void EntityItem::markAsChangedOnServer() {
|
||||
|
|
Loading…
Reference in a new issue