1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Remove unneeded dynamic_cast

This commit is contained in:
scrawl 2016-02-09 16:20:17 +01:00
parent 8ece1885cd
commit ce3cce24a5
2 changed files with 4 additions and 4 deletions

View File

@ -1327,9 +1327,9 @@ namespace MWRender
if (mPtr.getClass().isBipedal(mPtr))
{
NodeMap::const_iterator found = getNodeMap().find("bip01 head");
if (found != getNodeMap().end() && dynamic_cast<osg::MatrixTransform*>(found->second.get()))
if (found != getNodeMap().end())
{
osg::Node* node = found->second;
osg::MatrixTransform* node = found->second;
mHeadController = new RotateController(mObjectRoot.get());
node->addUpdateCallback(mHeadController);
mActiveControllers.insert(std::make_pair(node, mHeadController));

View File

@ -847,9 +847,9 @@ void NpcAnimation::addControllers()
if (mViewMode == VM_FirstPerson)
{
NodeMap::iterator found = mNodeMap.find("bip01 neck");
if (found != mNodeMap.end() && dynamic_cast<osg::MatrixTransform*>(found->second.get()))
if (found != mNodeMap.end())
{
osg::Node* node = found->second;
osg::MatrixTransform* node = found->second.get();
mFirstPersonNeckController = new NeckController(mObjectRoot.get());
node->addUpdateCallback(mFirstPersonNeckController);
mActiveControllers.insert(std::make_pair(node, mFirstPersonNeckController));