mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 23:26:41 +00:00 
			
		
		
		
	Simplify a funny-written function
This commit is contained in:
		
							parent
							
								
									83203ae4d9
								
							
						
					
					
						commit
						5299065cad
					
				
					 3 changed files with 4 additions and 17 deletions
				
			
		|  | @ -403,20 +403,10 @@ namespace MWWorld | |||
|         mWorkQueue = workQueue; | ||||
|     } | ||||
| 
 | ||||
|     bool CellPreloader::syncTerrainLoad( | ||||
|         const std::vector<CellPreloader::PositionCellGrid>& positions, double timestamp, Loading::Listener& listener) | ||||
|     void CellPreloader::syncTerrainLoad(Loading::Listener& listener) | ||||
|     { | ||||
|         if (!mTerrainPreloadItem) | ||||
|             return true; | ||||
|         else if (mTerrainPreloadItem->isDone()) | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|         if (mTerrainPreloadItem != nullptr && !mTerrainPreloadItem->isDone()) | ||||
|             mTerrainPreloadItem->wait(listener); | ||||
|             return true; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     void CellPreloader::abortTerrainPreloadExcept(const CellPreloader::PositionCellGrid* exceptPos) | ||||
|  |  | |||
|  | @ -71,8 +71,7 @@ namespace MWWorld | |||
|         typedef std::pair<osg::Vec3f, osg::Vec4i> PositionCellGrid; | ||||
|         void setTerrainPreloadPositions(const std::vector<PositionCellGrid>& positions); | ||||
| 
 | ||||
|         bool syncTerrainLoad(const std::vector<CellPreloader::PositionCellGrid>& positions, double timestamp, | ||||
|             Loading::Listener& listener); | ||||
|         void syncTerrainLoad(Loading::Listener& listener); | ||||
|         void abortTerrainPreloadExcept(const PositionCellGrid* exceptPos); | ||||
|         bool isTerrainLoaded(const CellPreloader::PositionCellGrid& position, double referenceTime) const; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1218,9 +1218,7 @@ namespace MWWorld | |||
| 
 | ||||
|         loadingListener->setLabel("#{OMWEngine:InitializingData}"); | ||||
| 
 | ||||
|         while (!mPreloader->syncTerrainLoad(vec, mRendering.getReferenceTime(), *loadingListener)) | ||||
|         { | ||||
|         } | ||||
|         mPreloader->syncTerrainLoad(*loadingListener); | ||||
|     } | ||||
| 
 | ||||
|     void Scene::reloadTerrain() | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue