mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 00:26:39 +00:00 
			
		
		
		
	Return a movement vector from the character controller update
This commit is contained in:
		
							parent
							
								
									daad8d9859
								
							
						
					
					
						commit
						685f219560
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -265,8 +265,7 @@ namespace MWMechanics
 | 
			
		|||
            std::vector<std::pair<std::string, Ogre::Vector3> > movement;
 | 
			
		||||
            for(PtrControllerMap::iterator iter(mActors.begin());iter != mActors.end();++iter)
 | 
			
		||||
            {
 | 
			
		||||
                iter->second.update(duration);
 | 
			
		||||
                Ogre::Vector3 vector = MWWorld::Class::get(iter->first).getMovementVector(iter->first);
 | 
			
		||||
                Ogre::Vector3 vector = iter->second.update(duration);
 | 
			
		||||
                if(vector!=Ogre::Vector3::ZERO)
 | 
			
		||||
                    movement.push_back(std::make_pair(iter->first.getRefData().getHandle(), vector));
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -69,10 +69,11 @@ void CharacterController::markerEvent(const std::string &evt)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void CharacterController::update(float duration)
 | 
			
		||||
Ogre::Vector3 CharacterController::update(float duration)
 | 
			
		||||
{
 | 
			
		||||
    if(mAnimation)
 | 
			
		||||
        mAnimation->runAnimation(duration);
 | 
			
		||||
    return MWWorld::Class::get(mPtr).getMovementVector(mPtr);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,7 +33,7 @@ public:
 | 
			
		|||
    CharacterController(const MWWorld::Ptr &ptr, MWRender::Animation *anim, CharacterState state);
 | 
			
		||||
    CharacterController(const CharacterController &rhs);
 | 
			
		||||
 | 
			
		||||
    void update(float duration);
 | 
			
		||||
    Ogre::Vector3 update(float duration);
 | 
			
		||||
 | 
			
		||||
    void playGroup(const std::string &groupname, int mode, int count);
 | 
			
		||||
    void skipAnim();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue