forked from mirror/openmw-tes3mp
optimizer: fix FlattenStaticTransformsVisitor not respecting the is permissible callback
This commit is contained in:
parent
5866f0f80b
commit
4051018862
1 changed files with 3 additions and 3 deletions
|
@ -281,11 +281,11 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor
|
|||
|
||||
ObjectStruct():_canBeApplied(true),_moreThanOneMatrixRequired(false) {}
|
||||
|
||||
void add(osg::Transform* transform)
|
||||
void add(osg::Transform* transform, bool canOptimize)
|
||||
{
|
||||
if (transform)
|
||||
{
|
||||
if (transform->getDataVariance()!=osg::Transform::STATIC) _moreThanOneMatrixRequired=true;
|
||||
if (!canOptimize) _moreThanOneMatrixRequired=true;
|
||||
else if (transform->getReferenceFrame()!=osg::Transform::RELATIVE_RF) _moreThanOneMatrixRequired=true;
|
||||
else
|
||||
{
|
||||
|
@ -322,7 +322,7 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor
|
|||
itr!=_currentObjectList.end();
|
||||
++itr)
|
||||
{
|
||||
_objectMap[*itr].add(transform);
|
||||
_objectMap[*itr].add(transform, transform && isOperationPermissibleForObject(transform));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue