From 4af1bce659722bd06c89a492bfb291f231891d06 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 18 Jul 2012 20:14:23 -0700 Subject: [PATCH] Restore and fix some missing parts --- apps/openmw/mwrender/npcanimation.cpp | 16 ++++++++++++++++ apps/openmw/mwrender/npcanimation.hpp | 4 ++++ components/nifogre/ogre_nif_loader.cpp | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 00583d427..62e9fd580 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -20,7 +20,10 @@ NpcAnimation::~NpcAnimation() removeEntities(head); removeEntities(hair); removeEntities(neck); + removeEntities(chest); removeEntities(groin); + removeEntities(rHand); + removeEntities(lHand); removeEntities(rWrist); removeEntities(lWrist); removeEntities(rForearm); @@ -37,6 +40,7 @@ NpcAnimation::~NpcAnimation() removeEntities(lUpperLeg); removeEntities(rclavicle); removeEntities(lclavicle); + removeEntities(tail); } @@ -406,8 +410,14 @@ void NpcAnimation::removeIndividualPart(int type) removeEntities(hair); else if(type == ESM::PRT_Neck) //2 removeEntities(neck); + else if(type == ESM::PRT_Cuirass)//3 + removeEntities(chest); else if(type == ESM::PRT_Groin)//4 removeEntities(groin); + else if(type == ESM::PRT_RHand)//6 + removeEntities(rHand); + else if(type == ESM::PRT_LHand)//7 + removeEntities(lHand); else if(type == ESM::PRT_RWrist)//8 removeEntities(rWrist); else if(type == ESM::PRT_LWrist) //9 @@ -446,6 +456,8 @@ void NpcAnimation::removeIndividualPart(int type) else if(type == ESM::PRT_Weapon) //25 { } + else if(type == ESM::PRT_Tail) //26 + removeEntities(tail); } void NpcAnimation::reserveIndividualPart(int type, int group, int priority) @@ -487,6 +499,7 @@ bool NpcAnimation::addOrReplaceIndividualPart(int type, int group, int priority, neck = insertBoundedPart(mesh, "Neck"); break; case ESM::PRT_Cuirass: //3 + chest = insertBoundedPart(mesh, "Chest"); break; case ESM::PRT_Groin: //4 groin = insertBoundedPart(mesh, "Groin"); @@ -494,8 +507,10 @@ bool NpcAnimation::addOrReplaceIndividualPart(int type, int group, int priority, case ESM::PRT_Skirt: //5 break; case ESM::PRT_RHand: //6 + rHand = insertBoundedPart(mesh, "Right Hand"); break; case ESM::PRT_LHand: //7 + lHand = insertBoundedPart(mesh, "Left Hand"); break; case ESM::PRT_RWrist: //8 rWrist = insertBoundedPart(mesh, "Right Wrist"); @@ -550,6 +565,7 @@ bool NpcAnimation::addOrReplaceIndividualPart(int type, int group, int priority, case ESM::PRT_Weapon: //25 break; case ESM::PRT_Tail: //26 + tail = insertBoundedPart(mesh, "Tail"); break; } return true; diff --git a/apps/openmw/mwrender/npcanimation.hpp b/apps/openmw/mwrender/npcanimation.hpp index 1eec1294f..9dda169e2 100644 --- a/apps/openmw/mwrender/npcanimation.hpp +++ b/apps/openmw/mwrender/npcanimation.hpp @@ -38,7 +38,11 @@ private: NifOgre::EntityList lfoot; NifOgre::EntityList rfoot; NifOgre::EntityList hair; + NifOgre::EntityList rHand; + NifOgre::EntityList lHand; NifOgre::EntityList head; + NifOgre::EntityList chest; + NifOgre::EntityList tail; bool isBeast; bool isFemale; diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index 646ec6c0b..e8bc6133a 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -942,7 +942,8 @@ EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bo Ogre::Entity *ent = sceneMgr->createEntity(meshes[i].first->getName()); if(ent->hasSkeleton()) { - if(meshes[i].second.length() < filter.length() || filter.compare(meshes[i].second) != 0) + if(meshes[i].second.length() < filter.length() || + meshes[i].second.compare(0, filter.length(), filter) != 0) { sceneMgr->destroyEntity(ent); meshes.erase(meshes.begin()+i);