From 9848b6717432883683a34d0f6f2efaaf5bb2711b Mon Sep 17 00:00:00 2001 From: Jason Hooks Date: Mon, 5 Mar 2012 17:46:29 -0500 Subject: [PATCH] Fixing errors --- apps/openmw/mwrender/animation.cpp | 10 +++++----- apps/openmw/mwrender/animation.hpp | 7 +++---- components/nifogre/ogre_nif_loader.cpp | 2 ++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 999d854141..4972654fcd 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -331,7 +331,7 @@ namespace MWRender{ } } - bool Animation::timeIndex( float time, std::vector& times, int & i, int & j, float & x ){ + bool Animation::timeIndex( float time, std::vector & times, int & i, int & j, float & x ){ int count; if ( (count = times.size()) > 0 ) { @@ -427,19 +427,19 @@ namespace MWRender{ float x; float x2; - std::vector& quats = iter->getQuat(); + std::vector & quats = iter->getQuat(); - std::vector& ttime = iter->gettTime(); + std::vector & ttime = iter->gettTime(); - std::vector& rtime = iter->getrTime(); + std::vector & rtime = iter->getrTime(); int rindexJ = rindexI[slot]; timeIndex(time, rtime, rindexI[slot], rindexJ, x2); int tindexJ = tindexI[slot]; - std::vector& translist1 = iter->getTranslist1(); + std::vector & translist1 = iter->getTranslist1(); timeIndex(time, ttime, tindexI[slot], tindexJ, x); diff --git a/apps/openmw/mwrender/animation.hpp b/apps/openmw/mwrender/animation.hpp index 63ca3da2d9..8e3f54315f 100644 --- a/apps/openmw/mwrender/animation.hpp +++ b/apps/openmw/mwrender/animation.hpp @@ -28,8 +28,7 @@ class Animation{ MWWorld::Environment& mEnvironment; std::map vecRotPos; static std::map mUniqueIDs; - float oldHund; - bool samePlace; + std::vector* > shapeparts; //All the NiTriShape data that we need for animating an npc @@ -57,11 +56,11 @@ class Animation{ Ogre::Entity* base; void handleShapes(std::vector* allshapes, Ogre::Entity* creaturemodel, Ogre::SkeletonInstance *skel); void handleAnimationTransforms(); - bool timeIndex( float time, std::vector& times, int & i, int & j, float & x ); + bool timeIndex( float time, std::vector & times, int & i, int & j, float & x ); std::string getUniqueID(std::string mesh); public: - Animation(MWWorld::Environment& _env, OEngine::Render::OgreRenderer& _rend): mRend(_rend), mEnvironment(_env), animate(0), oldHund(0){}; + Animation(MWWorld::Environment& _env, OEngine::Render::OgreRenderer& _rend): mRend(_rend), mEnvironment(_env), animate(0){}; virtual void runAnimation(float timepassed) = 0; void startScript(std::string groupname, int mode, int loops); void stopScript(); diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index 62dbc29dff..cb626acbeb 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -1328,6 +1328,8 @@ void NIFLoader::loadResource(Resource *resource) (*iter)->addBoneAssignment(vba); } + //Don't link on npc parts to eliminate redundant skeletons + //Will have to be changed later slightly for robes/skirts if(triname == "") mesh->_notifySkeleton(mSkel); }