some more small improvements

This commit is contained in:
HifiExperiments 2020-11-14 22:34:03 -08:00
parent 7bfbf3c99c
commit 06f7624512

View file

@ -1252,7 +1252,6 @@ void ModelEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPoint
entity->_originalTexturesRead = false; entity->_originalTexturesRead = false;
entity->_needsJointSimulation = true; entity->_needsJointSimulation = true;
entity->_needsToRescaleModel = true; entity->_needsToRescaleModel = true;
entity->updateModelBounds();
emit requestRenderUpdate(); emit requestRenderUpdate();
}); });
scene->enqueueTransaction(transaction); scene->enqueueTransaction(transaction);
@ -1271,7 +1270,6 @@ void ModelEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPoint
// Nothing else to do unless the model is loaded // Nothing else to do unless the model is loaded
if (!model->isLoaded()) { if (!model->isLoaded()) {
emit requestRenderUpdate();
return; return;
} }
@ -1295,10 +1293,11 @@ void ModelEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPoint
entity->_originalTexturesRead = true; entity->_originalTexturesRead = true;
} }
if (_textures != entity->getTextures()) { auto textures = entity->getTextures();
if (_textures != textures) {
QVariantMap newTextures; QVariantMap newTextures;
_texturesLoaded = false; _texturesLoaded = false;
_textures = entity->getTextures(); _textures = textures;
newTextures = parseTexturesToMap(_textures, entity->_originalTextures); newTextures = parseTexturesToMap(_textures, entity->_originalTextures);
model->setTextures(newTextures); model->setTextures(newTextures);
} }