mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 20:56:39 +00:00 
			
		
		
		
	Split up the UpperBody group
Also recognize the [un]equip start and stop text keys.
This commit is contained in:
		
							parent
							
								
									70dc2f77ad
								
							
						
					
					
						commit
						a9928bb842
					
				
					 2 changed files with 16 additions and 5 deletions
				
			
		|  | @ -147,8 +147,9 @@ size_t Animation::detectAnimGroup(const Ogre::Node *node) | |||
| { | ||||
|     static const char sGroupRoots[sNumGroups][32] = { | ||||
|         "", /* Lower body / character root */ | ||||
|         "Bip01 Spine1", /* Upper body */ | ||||
|         "Bip01 Spine1", /* Torso */ | ||||
|         "Bip01 L Clavicle", /* Left arm */ | ||||
|         "Bip01 R Clavicle", /* Right arm */ | ||||
|     }; | ||||
| 
 | ||||
|     while(node) | ||||
|  | @ -474,6 +475,11 @@ bool Animation::handleTextKey(AnimState &state, const std::string &groupname, co | |||
|         return true; | ||||
|     } | ||||
| 
 | ||||
|     /* Nothing to do for these */ | ||||
|     if(evt.compare(off, len, "equip start") == 0 || evt.compare(off, len, "equip stop") == 0 || | ||||
|        evt.compare(off, len, "unequip start") == 0 || evt.compare(off, len, "unequip stop") == 0) | ||||
|         return true; | ||||
| 
 | ||||
|     std::cerr<< "Unhandled animation textkey: "<<evt <<std::endl; | ||||
|     return true; | ||||
| } | ||||
|  |  | |||
|  | @ -17,14 +17,19 @@ class Animation | |||
| public: | ||||
|     enum Group { | ||||
|         Group_LowerBody = 1<<0, | ||||
|         Group_UpperBody = 1<<1, | ||||
|         Group_LeftArm = 1<<2, | ||||
| 
 | ||||
|         Group_All = Group_LowerBody | Group_UpperBody | Group_LeftArm | ||||
|         Group_Torso = 1<<1, | ||||
|         Group_LeftArm = 1<<2, | ||||
|         Group_RightArm = 1<<3, | ||||
| 
 | ||||
|         Group_UpperBody = Group_Torso | Group_LeftArm | Group_RightArm, | ||||
| 
 | ||||
|         Group_All = Group_LowerBody | Group_UpperBody | ||||
|     }; | ||||
| 
 | ||||
| protected: | ||||
|     static const size_t sNumGroups = 3; | ||||
|     /* This is the number of *discrete* groups. */ | ||||
|     static const size_t sNumGroups = 4; | ||||
| 
 | ||||
|     class AnimationValue : public Ogre::ControllerValue<Ogre::Real> | ||||
|     { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue