Merge pull request #15153 from danteruiz/fix-soft-entity-popping

Case 21618: menithal's avatar is constantly flashing
This commit is contained in:
Shannon Romano 2019-03-11 18:09:44 -07:00 committed by GitHub
commit 44fa00606a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -181,9 +181,11 @@ void RenderableModelEntityItem::updateModelBounds() {
updateRenderItems = true;
}
if (model->getScaleToFitDimensions() != getScaledDimensions() ||
model->getRegistrationPoint() != getRegistrationPoint() ||
!model->getIsScaledToFit()) {
bool overridingModelTransform = model->isOverridingModelTransformAndOffset();
if (!overridingModelTransform &&
(model->getScaleToFitDimensions() != getScaledDimensions() ||
model->getRegistrationPoint() != getRegistrationPoint() ||
!model->getIsScaledToFit())) {
// The machinery for updateModelBounds will give existing models the opportunity to fix their
// translation/rotation/scale/registration. The first two are straightforward, but the latter two
// have guards to make sure they don't happen after they've already been set. Here we reset those guards.