1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 08:15:37 +00:00

fixes coverity-ci warning

This commit is contained in:
Bo Svensson 2021-10-06 10:04:03 +00:00 committed by GitHub
parent cd4d76f8c5
commit 87d52dc1fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,16 +70,14 @@ void ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo) const
void InverseWorldMatrix::operator()(osg::MatrixTransform *node, osg::NodeVisitor *nv)
{
if (nv && nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR)
{
osg::NodePath path = nv->getNodePath();
path.pop_back();
osg::NodePath path = nv->getNodePath();
path.pop_back();
osg::Matrix mat = osg::computeLocalToWorld( path );
mat.orthoNormalize(mat); // don't undo the scale
mat.invert(mat);
node->setMatrix(mat);
osg::Matrix mat = osg::computeLocalToWorld( path );
mat.orthoNormalize(mat); // don't undo the scale
mat.invert(mat);
node->setMatrix(mat);
}
traverse(node,nv);
}