mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 17:56:42 +00:00 
			
		
		
		
	avoid locking up in case actor updates repeatedly throw exceptions
This commit is contained in:
		
							parent
							
								
									6744375636
								
							
						
					
					
						commit
						483b125aad
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		|  | @ -126,15 +126,16 @@ namespace MWMechanics | ||||||
| 
 | 
 | ||||||
|         if (mDuration>=0.25) |         if (mDuration>=0.25) | ||||||
|         { |         { | ||||||
|  |             float totalDuration = mDuration; | ||||||
|  |             mDuration = 0; | ||||||
|  | 
 | ||||||
|             for (std::set<MWWorld::Ptr>::iterator iter (mActors.begin()); iter!=mActors.end(); ++iter) |             for (std::set<MWWorld::Ptr>::iterator iter (mActors.begin()); iter!=mActors.end(); ++iter) | ||||||
|             { |             { | ||||||
|                 updateActor (*iter, mDuration); |                 updateActor (*iter, totalDuration); | ||||||
| 
 | 
 | ||||||
|                 if (iter->getTypeName()==typeid (ESM::NPC).name()) |                 if (iter->getTypeName()==typeid (ESM::NPC).name()) | ||||||
|                     updateNpc (*iter, mDuration, paused); |                     updateNpc (*iter, totalDuration, paused); | ||||||
|             } |             } | ||||||
| 
 |  | ||||||
|             mDuration = 0; |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         for (std::set<MWWorld::Ptr>::iterator iter (mActors.begin()); iter!=mActors.end(); |         for (std::set<MWWorld::Ptr>::iterator iter (mActors.begin()); iter!=mActors.end(); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue