forked from mirror/openmw-tes3mp
merge
This commit is contained in:
parent
71c3bd6288
commit
fbde798968
2 changed files with 13 additions and 18 deletions
|
@ -1067,11 +1067,11 @@ void NIFLoader::handleNode(Nif::Node *node, int flags,
|
||||||
|
|
||||||
if(mOutputAnimFiles){
|
if(mOutputAnimFiles){
|
||||||
std::string cut = "";
|
std::string cut = "";
|
||||||
for(unsigned int i = 0; i < name.length(); i++)
|
for(unsigned int i = 0; i < resourcename.length(); i++)
|
||||||
{
|
{
|
||||||
if(!(name.at(i) == '\\' || name.at(i) == '/' || name.at(i) == '>' || name.at(i) == '<' || name.at(i) == '?' || name.at(i) == '*' || name.at(i) == '|' || name.at(i) == ':' || name.at(i) == '"'))
|
if(!(resourcename.at(i) == '\\' || resourcename.at(i) == '/' || resourcename.at(i) == '>' || resourcename.at(i) == '<' || resourcename.at(i) == '?' || resourcename.at(i) == '*' || resourcename.at(i) == '|' || resourcename.at(i) == ':' || resourcename.at(i) == '"'))
|
||||||
{
|
{
|
||||||
cut += name.at(i);
|
cut += resourcename.at(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1210,14 +1210,14 @@ void NIFLoader::loadResource(Resource *resource)
|
||||||
mesh = 0;
|
mesh = 0;
|
||||||
mSkel.setNull();
|
mSkel.setNull();
|
||||||
flip = false;
|
flip = false;
|
||||||
name = resource->getName();
|
resourcename = resource->getName();
|
||||||
char suffix = name.at(name.length() - 2);
|
char suffix = resourcename.at(resourcename.length() - 2);
|
||||||
bool addAnim = true;
|
bool addAnim = true;
|
||||||
bool hasAnim = false;
|
bool hasAnim = false;
|
||||||
bool linkSkeleton = true;
|
bool linkSkeleton = true;
|
||||||
//bool baddin = false;
|
//bool baddin = false;
|
||||||
bNiTri = true;
|
bNiTri = true;
|
||||||
if(name == "meshes\\base_anim.nif" || name == "meshes\\base_animkna.nif")
|
if(resourcename == "meshes\\base_anim.nif" || resourcename == "meshes\\base_animkna.nif")
|
||||||
{
|
{
|
||||||
bNiTri = false;
|
bNiTri = false;
|
||||||
}
|
}
|
||||||
|
@ -1239,7 +1239,7 @@ void NIFLoader::loadResource(Resource *resource)
|
||||||
{
|
{
|
||||||
//baddin = true;
|
//baddin = true;
|
||||||
bNiTri = true;
|
bNiTri = true;
|
||||||
std::string sub = name.substr(name.length() - 6, 4);
|
std::string sub = resourcename.substr(resourcename.length() - 6, 4);
|
||||||
|
|
||||||
if(sub.compare("0000") != 0)
|
if(sub.compare("0000") != 0)
|
||||||
addAnim = false;
|
addAnim = false;
|
||||||
|
@ -1250,14 +1250,14 @@ void NIFLoader::loadResource(Resource *resource)
|
||||||
//baddin = true;
|
//baddin = true;
|
||||||
linkSkeleton = false;
|
linkSkeleton = false;
|
||||||
bNiTri = true;
|
bNiTri = true;
|
||||||
std::string sub = name.substr(name.length() - 6, 4);
|
std::string sub = resourcename.substr(resourcename.length() - 6, 4);
|
||||||
|
|
||||||
if(sub.compare("0000") != 0)
|
if(sub.compare("0000") != 0)
|
||||||
addAnim = false;
|
addAnim = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(name.at(name.length() - 1))
|
switch(resourcename.at(resourcename.length() - 1))
|
||||||
{
|
{
|
||||||
case '"':
|
case '"':
|
||||||
triname = "tri chest";
|
triname = "tri chest";
|
||||||
|
@ -1366,12 +1366,12 @@ void NIFLoader::loadResource(Resource *resource)
|
||||||
mesh->_setBoundingSphereRadius(bounds.getRadius());
|
mesh->_setBoundingSphereRadius(bounds.getRadius());
|
||||||
}
|
}
|
||||||
if(hasAnim && addAnim){
|
if(hasAnim && addAnim){
|
||||||
allanimmap[name] = allanim;
|
allanimmap[resourcename] = allanim;
|
||||||
alltextmappings[name] = textmappings;
|
alltextmappings[resourcename] = textmappings;
|
||||||
}
|
}
|
||||||
if(!mSkel.isNull() && shapes.size() > 0 && addAnim)
|
if(!mSkel.isNull() && shapes.size() > 0 && addAnim)
|
||||||
{
|
{
|
||||||
allshapesmap[name] = shapes;
|
allshapesmap[resourcename] = shapes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1421,11 +1421,6 @@ MeshPtr NIFLoader::load(const std::string &name,
|
||||||
return themesh;
|
return themesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
This function shares much of the same code handleShapes() in MWRender::Animation
|
|
||||||
This function also creates new position and normal buffers for submeshes.
|
|
||||||
This function points to existing texture and IndexData buffers
|
|
||||||
*/
|
|
||||||
|
|
||||||
std::vector<Nif::NiKeyframeData>* NIFLoader::getAnim(std::string lowername){
|
std::vector<Nif::NiKeyframeData>* NIFLoader::getAnim(std::string lowername){
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ class NIFLoader : Ogre::ManualResourceLoader
|
||||||
Ogre::SkeletonPtr mSkel;
|
Ogre::SkeletonPtr mSkel;
|
||||||
Ogre::Vector3 vector;
|
Ogre::Vector3 vector;
|
||||||
std::vector<Nif::NiTriShapeCopy> shapes;
|
std::vector<Nif::NiTriShapeCopy> shapes;
|
||||||
std::string name;
|
std::string resourcename;
|
||||||
std::string triname;
|
std::string triname;
|
||||||
std::vector<Nif::NiKeyframeData> allanim;
|
std::vector<Nif::NiKeyframeData> allanim;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue