mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 18:38:29 +02:00
don't apply clock-skew to a lastEdited of 0
This commit is contained in:
parent
e2098038f1
commit
82fcfc1d64
2 changed files with 4 additions and 1 deletions
|
@ -470,7 +470,7 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
|
|||
Q_ASSERT(parser.offset() == (unsigned int) bytesRead);
|
||||
}
|
||||
#endif
|
||||
quint64 lastEditedFromBufferAdjusted = lastEditedFromBuffer - clockSkew;
|
||||
quint64 lastEditedFromBufferAdjusted = lastEditedFromBuffer == 0 ? 0 : lastEditedFromBuffer - clockSkew;
|
||||
if (lastEditedFromBufferAdjusted > now) {
|
||||
lastEditedFromBufferAdjusted = now;
|
||||
}
|
||||
|
|
|
@ -459,6 +459,7 @@ bool EntityTreeElement::bestFitEntityBounds(EntityItemPointer entity) const {
|
|||
bool success;
|
||||
auto queryCube = entity->getQueryAACube(success);
|
||||
if (!success) {
|
||||
qDebug() << "EntityTreeElement::bestFitEntityBounds couldn't get queryCube for" << entity->getName() << entity->getID();
|
||||
return false;
|
||||
}
|
||||
return bestFitBounds(queryCube);
|
||||
|
@ -904,6 +905,8 @@ int EntityTreeElement::readElementDataFromBuffer(const unsigned char* data, int
|
|||
_myTree->entityChanged(entityItem);
|
||||
}
|
||||
bool bestFitAfter = bestFitEntityBounds(entityItem);
|
||||
qDebug() << "got update for" << entityItem->getName() << bestFitBefore << bestFitAfter <<
|
||||
entityItem->getQueryAACube();
|
||||
|
||||
if (bestFitBefore != bestFitAfter) {
|
||||
// This is the case where the entity existed, and is in some element in our tree...
|
||||
|
|
Loading…
Reference in a new issue