mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-29 03:26:38 +00:00 
			
		
		
		
	Revert "Revert "Use a child scene node for the accumulation root""
This reverts commit 376dfed15b.
I was wrong. It's needed at least for NPCs since they're attaching multiple
animated skeletons to an object, and they all need to be offset correctly.
Would be nice to use a Node, Bone, or TagPoint instead of a hefty SceneNode,
though.
			
			
This commit is contained in:
		
							parent
							
								
									e6e7c69013
								
							
						
					
					
						commit
						fc7590694d
					
				
					 2 changed files with 3 additions and 4 deletions
				
			
		|  | @ -48,7 +48,7 @@ Animation::~Animation() | |||
| 
 | ||||
| void Animation::createEntityList(Ogre::SceneNode *node, const std::string &model) | ||||
| { | ||||
|     mInsert = node; | ||||
|     mInsert = node->createChildSceneNode(); | ||||
|     assert(mInsert); | ||||
| 
 | ||||
|     mEntityList = NifOgre::Loader::createEntities(mInsert, model); | ||||
|  | @ -76,8 +76,7 @@ void Animation::createEntityList(Ogre::SceneNode *node, const std::string &model | |||
|             if(data.isEmpty() || !Ogre::any_cast<bool>(data)) | ||||
|                 continue; | ||||
| 
 | ||||
|             mAccumRoot = skelinst->getRootBone(); | ||||
|             mAccumRoot->setManuallyControlled(true); | ||||
|             mAccumRoot = mInsert; | ||||
|             mNonAccumRoot = skelinst->getBone(bone->getHandle()); | ||||
| 
 | ||||
|             mStartPosition = mNonAccumRoot->getInitialPosition(); | ||||
|  |  | |||
|  | @ -22,7 +22,7 @@ protected: | |||
|     Ogre::SceneNode* mInsert; | ||||
|     NifOgre::EntityList mEntityList; | ||||
|     std::map<std::string,NifOgre::TextKeyMap> mTextKeys; | ||||
|     Ogre::Bone *mAccumRoot; | ||||
|     Ogre::Node *mAccumRoot; | ||||
|     Ogre::Bone *mNonAccumRoot; | ||||
|     Ogre::Vector3 mAccumulate; | ||||
|     Ogre::Vector3 mStartPosition; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue