1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

Remove unneeded cast

This commit is contained in:
scrawl 2015-12-06 15:44:27 +01:00
parent e39f49a88f
commit 1d5af3c9c8

View file

@ -113,7 +113,7 @@ namespace
} }
}; };
// NodeCallback used to have a transform always oriented towards the camera. Can have translation and scale // NodeCallback used to have a node always oriented towards the camera. The node can have translation and scale
// set just like a regular MatrixTransform, but the rotation set will be overridden in order to face the camera. // set just like a regular MatrixTransform, but the rotation set will be overridden in order to face the camera.
// Must be set as a cull callback. // Must be set as a cull callback.
class BillboardCallback : public osg::NodeCallback class BillboardCallback : public osg::NodeCallback
@ -132,8 +132,7 @@ namespace
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{ {
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv); osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
osg::MatrixTransform* billboardNode = dynamic_cast<osg::MatrixTransform*>(node); if (node && cv)
if (billboardNode && cv)
{ {
osg::Matrix modelView = *cv->getModelViewMatrix(); osg::Matrix modelView = *cv->getModelViewMatrix();