mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-28 17:56:37 +00:00 
			
		
		
		
	Merge pull request #2604 from akortunov/fading
Do not use screen fading during game loading if there is no current cell
This commit is contained in:
		
						commit
						2cbb01627b
					
				
					 2 changed files with 7 additions and 7 deletions
				
			
		|  | @ -175,6 +175,7 @@ | |||
|     Bug #5206: A "class does not have NPC stats" error when player's follower kills an enemy with damage spell | ||||
|     Bug #5209: Spellcasting ignores race height | ||||
|     Bug #5210: AiActivate allows actors to open dialogue and inventory windows | ||||
|     Bug #5211: Screen fades in if the first loaded save is in interior cell | ||||
|     Feature #1774: Handle AvoidNode | ||||
|     Feature #2229: Improve pathfinding AI | ||||
|     Feature #3025: Analogue gamepad movement controls | ||||
|  |  | |||
|  | @ -683,11 +683,9 @@ namespace MWWorld | |||
|     void Scene::changeToInteriorCell (const std::string& cellName, const ESM::Position& position, bool adjustPlayerPos, bool changeEvent) | ||||
|     { | ||||
|         CellStore *cell = MWBase::Environment::get().getWorld()->getInterior(cellName); | ||||
|         bool loadcell = (mCurrentCell == nullptr); | ||||
|         if(!loadcell) | ||||
|             loadcell = *mCurrentCell != *cell; | ||||
| 
 | ||||
|         MWBase::Environment::get().getWindowManager()->fadeScreenOut(0.5); | ||||
|         bool useFading = (mCurrentCell != nullptr); | ||||
|         if (useFading) | ||||
|             MWBase::Environment::get().getWindowManager()->fadeScreenOut(0.5); | ||||
| 
 | ||||
|         Loading::Listener* loadingListener = MWBase::Environment::get().getWindowManager()->getLoadingScreen(); | ||||
|         int messagesCount = MWBase::Environment::get().getWindowManager()->getMessagesCount(); | ||||
|  | @ -695,7 +693,7 @@ namespace MWWorld | |||
|         loadingListener->setLabel(loadingInteriorText, false, messagesCount > 0); | ||||
|         Loading::ScopedLoad load(loadingListener); | ||||
| 
 | ||||
|         if(!loadcell) | ||||
|         if(mCurrentCell != nullptr && *mCurrentCell == *cell) | ||||
|         { | ||||
|             MWBase::World *world = MWBase::Environment::get().getWorld(); | ||||
|             world->moveObject(world->getPlayerPtr(), position.pos[0], position.pos[1], position.pos[2]); | ||||
|  | @ -734,7 +732,8 @@ namespace MWWorld | |||
|         if (changeEvent) | ||||
|             mCellChanged = true; | ||||
| 
 | ||||
|         MWBase::Environment::get().getWindowManager()->fadeScreenIn(0.5); | ||||
|         if (useFading) | ||||
|             MWBase::Environment::get().getWindowManager()->fadeScreenIn(0.5); | ||||
| 
 | ||||
|         MWBase::Environment::get().getWindowManager()->changeCell(mCurrentCell); | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue