mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 17:15:35 +00:00
GeomMorpherController: do not dirty the MorphGeometry unless necessary
This commit is contained in:
parent
0d49c7fa51
commit
38510a56c2
1 changed files with 6 additions and 1 deletions
|
@ -235,7 +235,12 @@ void GeomMorpherController::update(osg::NodeVisitor *nv, osg::Drawable *drawable
|
|||
val = interpKey((*it)->mKeys, input);
|
||||
val = std::max(0.f, std::min(1.f, val));
|
||||
|
||||
morphGeom->setWeight(i, val);
|
||||
osgAnimation::MorphGeometry::MorphTarget& target = morphGeom->getMorphTarget(i);
|
||||
if (target.getWeight() != val)
|
||||
{
|
||||
target.setWeight(val);
|
||||
morphGeom->dirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue