mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 21:41:33 +00:00
Remove unneeded dynamic_cast
This commit is contained in:
parent
8ece1885cd
commit
ce3cce24a5
2 changed files with 4 additions and 4 deletions
|
@ -1327,9 +1327,9 @@ namespace MWRender
|
||||||
if (mPtr.getClass().isBipedal(mPtr))
|
if (mPtr.getClass().isBipedal(mPtr))
|
||||||
{
|
{
|
||||||
NodeMap::const_iterator found = getNodeMap().find("bip01 head");
|
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());
|
mHeadController = new RotateController(mObjectRoot.get());
|
||||||
node->addUpdateCallback(mHeadController);
|
node->addUpdateCallback(mHeadController);
|
||||||
mActiveControllers.insert(std::make_pair(node, mHeadController));
|
mActiveControllers.insert(std::make_pair(node, mHeadController));
|
||||||
|
|
|
@ -847,9 +847,9 @@ void NpcAnimation::addControllers()
|
||||||
if (mViewMode == VM_FirstPerson)
|
if (mViewMode == VM_FirstPerson)
|
||||||
{
|
{
|
||||||
NodeMap::iterator found = mNodeMap.find("bip01 neck");
|
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());
|
mFirstPersonNeckController = new NeckController(mObjectRoot.get());
|
||||||
node->addUpdateCallback(mFirstPersonNeckController);
|
node->addUpdateCallback(mFirstPersonNeckController);
|
||||||
mActiveControllers.insert(std::make_pair(node, mFirstPersonNeckController));
|
mActiveControllers.insert(std::make_pair(node, mFirstPersonNeckController));
|
||||||
|
|
Loading…
Reference in a new issue