1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-05-02 04:11:23 +00:00

Do not use screen fading during game loading if there is no current cell (bug #5211)

This commit is contained in:
Andrei Kortunov 2019-11-18 22:10:31 +04:00
parent 980e0c4936
commit 73f43ba750
2 changed files with 7 additions and 7 deletions

View file

@ -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 #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 #5209: Spellcasting ignores race height
Bug #5210: AiActivate allows actors to open dialogue and inventory windows 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 #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls Feature #3025: Analogue gamepad movement controls

View file

@ -683,10 +683,8 @@ namespace MWWorld
void Scene::changeToInteriorCell (const std::string& cellName, const ESM::Position& position, bool adjustPlayerPos, bool changeEvent) void Scene::changeToInteriorCell (const std::string& cellName, const ESM::Position& position, bool adjustPlayerPos, bool changeEvent)
{ {
CellStore *cell = MWBase::Environment::get().getWorld()->getInterior(cellName); CellStore *cell = MWBase::Environment::get().getWorld()->getInterior(cellName);
bool loadcell = (mCurrentCell == nullptr); bool useFading = (mCurrentCell != nullptr);
if(!loadcell) if (useFading)
loadcell = *mCurrentCell != *cell;
MWBase::Environment::get().getWindowManager()->fadeScreenOut(0.5); MWBase::Environment::get().getWindowManager()->fadeScreenOut(0.5);
Loading::Listener* loadingListener = MWBase::Environment::get().getWindowManager()->getLoadingScreen(); Loading::Listener* loadingListener = MWBase::Environment::get().getWindowManager()->getLoadingScreen();
@ -695,7 +693,7 @@ namespace MWWorld
loadingListener->setLabel(loadingInteriorText, false, messagesCount > 0); loadingListener->setLabel(loadingInteriorText, false, messagesCount > 0);
Loading::ScopedLoad load(loadingListener); Loading::ScopedLoad load(loadingListener);
if(!loadcell) if(mCurrentCell != nullptr && *mCurrentCell == *cell)
{ {
MWBase::World *world = MWBase::Environment::get().getWorld(); MWBase::World *world = MWBase::Environment::get().getWorld();
world->moveObject(world->getPlayerPtr(), position.pos[0], position.pos[1], position.pos[2]); world->moveObject(world->getPlayerPtr(), position.pos[0], position.pos[1], position.pos[2]);
@ -734,6 +732,7 @@ namespace MWWorld
if (changeEvent) if (changeEvent)
mCellChanged = true; mCellChanged = true;
if (useFading)
MWBase::Environment::get().getWindowManager()->fadeScreenIn(0.5); MWBase::Environment::get().getWindowManager()->fadeScreenIn(0.5);
MWBase::Environment::get().getWindowManager()->changeCell(mCurrentCell); MWBase::Environment::get().getWindowManager()->changeCell(mCurrentCell);