mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-30 02:56:44 +00:00 
			
		
		
		
	Pass "loop stop" to the character controller
This commit is contained in:
		
							parent
							
								
									d7c9df16f8
								
							
						
					
					
						commit
						6c85d6763a
					
				
					 2 changed files with 11 additions and 2 deletions
				
			
		|  | @ -150,6 +150,15 @@ void CharacterController::updatePtr(const MWWorld::Ptr &ptr) | ||||||
| 
 | 
 | ||||||
| void CharacterController::markerEvent(float time, const std::string &evt) | void CharacterController::markerEvent(float time, const std::string &evt) | ||||||
| { | { | ||||||
|  |     if(evt == "loop stop") | ||||||
|  |     { | ||||||
|  |         if(mAnimQueue.size() >= 2 && mAnimQueue[0] == mAnimQueue[1]) | ||||||
|  |         { | ||||||
|  |             mAnimQueue.pop_front(); | ||||||
|  |             mAnimation->play(mCurrentGroup, "loop start", "stop", false); | ||||||
|  |         } | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|     if(evt == "stop") |     if(evt == "stop") | ||||||
|     { |     { | ||||||
|         if(mAnimQueue.size() >= 2 && mAnimQueue[0] == mAnimQueue[1]) |         if(mAnimQueue.size() >= 2 && mAnimQueue[0] == mAnimQueue[1]) | ||||||
|  |  | ||||||
|  | @ -409,10 +409,10 @@ bool Animation::handleEvent(float time, const std::string &evt) | ||||||
|             reset("loop start"); |             reset("loop start"); | ||||||
|             if(mCurrentTime >= time) |             if(mCurrentTime >= time) | ||||||
|                 return false; |                 return false; | ||||||
|  |             return true; | ||||||
|         } |         } | ||||||
|         return true; |  | ||||||
|     } |     } | ||||||
|     if(evt == "stop") |     else if(evt == "stop") | ||||||
|     { |     { | ||||||
|         if(mLooping) |         if(mLooping) | ||||||
|         { |         { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue