mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 12:41:01 +00:00
Mirror left-sided parts
This commit is contained in:
parent
4af1bce659
commit
bd74ab027a
@ -33,6 +33,7 @@
|
|||||||
#include <OgreSubMesh.h>
|
#include <OgreSubMesh.h>
|
||||||
#include <OgreRoot.h>
|
#include <OgreRoot.h>
|
||||||
#include <OgreEntity.h>
|
#include <OgreEntity.h>
|
||||||
|
#include <OgreTagPoint.h>
|
||||||
|
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
#include <components/nifoverrides/nifoverrides.hpp>
|
#include <components/nifoverrides/nifoverrides.hpp>
|
||||||
@ -956,6 +957,10 @@ EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bo
|
|||||||
entitylist.mEntities.push_back(ent);
|
entitylist.mEntities.push_back(ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ogre::Vector3 scale(1.0f);
|
||||||
|
if(bonename.find("Left") != std::string::npos)
|
||||||
|
scale.x *= -1.0f;
|
||||||
|
|
||||||
if(entitylist.mSkelBase)
|
if(entitylist.mSkelBase)
|
||||||
{
|
{
|
||||||
entitylist.mSkelBase->shareSkeletonInstanceWith(parent);
|
entitylist.mSkelBase->shareSkeletonInstanceWith(parent);
|
||||||
@ -969,13 +974,19 @@ EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bo
|
|||||||
parentNode->attachObject(entity);
|
parentNode->attachObject(entity);
|
||||||
}
|
}
|
||||||
else if(entity != entitylist.mSkelBase)
|
else if(entity != entitylist.mSkelBase)
|
||||||
parent->attachObjectToBone(bonename, entity);
|
{
|
||||||
|
Ogre::TagPoint *tag = parent->attachObjectToBone(bonename, entity);
|
||||||
|
tag->setScale(scale);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(size_t i = 0;i < entitylist.mEntities.size();i++)
|
for(size_t i = 0;i < entitylist.mEntities.size();i++)
|
||||||
parent->attachObjectToBone(bonename, entitylist.mEntities[i]);
|
{
|
||||||
|
Ogre::TagPoint *tag = parent->attachObjectToBone(bonename, entitylist.mEntities[i]);
|
||||||
|
tag->setScale(scale);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return entitylist;
|
return entitylist;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user