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:
parent
8ece1885cd
commit
ce3cce24a5
@ -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));
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user