mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:17:02 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into auto-updater
This commit is contained in:
commit
6fcdb83d46
2 changed files with 7 additions and 4 deletions
|
@ -392,17 +392,20 @@ OctreeElement::AppendState EntityTreeElement::appendElementData(OctreePacketData
|
||||||
|
|
||||||
// If we wrote fewer entities than we expected, update the number of entities in our packet
|
// If we wrote fewer entities than we expected, update the number of entities in our packet
|
||||||
bool successUpdateEntityCount = true;
|
bool successUpdateEntityCount = true;
|
||||||
if (!noEntitiesFit && numberOfEntities != actualNumberOfEntities) {
|
if (numberOfEntities != actualNumberOfEntities) {
|
||||||
successUpdateEntityCount = packetData->updatePriorBytes(numberOfEntitiesOffset,
|
successUpdateEntityCount = packetData->updatePriorBytes(numberOfEntitiesOffset,
|
||||||
(const unsigned char*)&actualNumberOfEntities, sizeof(actualNumberOfEntities));
|
(const unsigned char*)&actualNumberOfEntities, sizeof(actualNumberOfEntities));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we weren't able to update our entity count, or we couldn't fit any entities, then
|
// If we weren't able to update our entity count, or we couldn't fit any entities, then
|
||||||
// we should discard our element and return a result of NONE
|
// we should discard our element and return a result of NONE
|
||||||
if (!successUpdateEntityCount || noEntitiesFit) {
|
if (!successUpdateEntityCount) {
|
||||||
packetData->discardLevel(elementLevel);
|
packetData->discardLevel(elementLevel);
|
||||||
appendElementState = OctreeElement::NONE;
|
appendElementState = OctreeElement::NONE;
|
||||||
} else {
|
} else {
|
||||||
|
if (noEntitiesFit) {
|
||||||
|
appendElementState = OctreeElement::PARTIAL;
|
||||||
|
}
|
||||||
packetData->endLevel(elementLevel);
|
packetData->endLevel(elementLevel);
|
||||||
}
|
}
|
||||||
return appendElementState;
|
return appendElementState;
|
||||||
|
|
|
@ -1761,7 +1761,7 @@ void Model::setupBatchTransform(gpu::Batch& batch, RenderArgs* args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AABox Model::getPartBounds(int meshIndex, int partIndex) {
|
AABox Model::getPartBounds(int meshIndex, int partIndex) {
|
||||||
if (!_calculatedMeshPartBoxesValid) {
|
if (!_calculatedMeshPartBoxesValid || !_calculatedMeshBoxesValid) {
|
||||||
recalculateMeshBoxes(true);
|
recalculateMeshBoxes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1802,7 +1802,7 @@ void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool tran
|
||||||
|
|
||||||
// we always need these properly calculated before we can render, this will likely already have been done
|
// we always need these properly calculated before we can render, this will likely already have been done
|
||||||
// since the engine will call our getPartBounds() before rendering us.
|
// since the engine will call our getPartBounds() before rendering us.
|
||||||
if (!_calculatedMeshPartBoxesValid) {
|
if (!_calculatedMeshPartBoxesValid || !_calculatedMeshBoxesValid) {
|
||||||
recalculateMeshBoxes(true);
|
recalculateMeshBoxes(true);
|
||||||
}
|
}
|
||||||
auto textureCache = DependencyManager::get<TextureCache>();
|
auto textureCache = DependencyManager::get<TextureCache>();
|
||||||
|
|
Loading…
Reference in a new issue