1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

Make sure dialogue is ended properly when closing it by using a service (Fixes #1755)

This commit is contained in:
scrawl 2014-08-04 02:13:44 +02:00
parent 1fc424ce30
commit 0b1e997bdd
4 changed files with 8 additions and 5 deletions

View file

@ -338,7 +338,7 @@ namespace MWGui
MWBase::Environment::get().getMechanicsManager()->reportCrime(player, mPtr, MWBase::MechanicsManager::OT_Theft, MWBase::Environment::get().getMechanicsManager()->reportCrime(player, mPtr, MWBase::MechanicsManager::OT_Theft,
item.getClass().getValue(item)); item.getClass().getValue(item));
MWBase::Environment::get().getWindowManager()->removeGuiMode (GM_Enchanting); MWBase::Environment::get().getWindowManager()->removeGuiMode (GM_Enchanting);
MWBase::Environment::get().getWindowManager()->removeGuiMode (GM_Dialogue); MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
return; return;
} }
} }

View file

@ -308,7 +308,7 @@ namespace MWGui
it->mBase.getClass().getValue(it->mBase) it->mBase.getClass().getValue(it->mBase)
* it->mCount); * it->mCount);
onCancelButtonClicked(mCancelButton); onCancelButtonClicked(mCancelButton);
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue); MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
return; return;
} }
} }

View file

@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp" #include "../mwbase/world.hpp"
#include "../mwbase/mechanicsmanager.hpp" #include "../mwbase/mechanicsmanager.hpp"
#include "../mwbase/dialoguemanager.hpp"
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwworld/containerstore.hpp" #include "../mwworld/containerstore.hpp"
@ -162,7 +163,7 @@ namespace MWGui
// go back to game mode // go back to game mode
MWBase::Environment::get().getWindowManager()->removeGuiMode (GM_Training); MWBase::Environment::get().getWindowManager()->removeGuiMode (GM_Training);
MWBase::Environment::get().getWindowManager()->removeGuiMode (GM_Dialogue); MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
// advance time // advance time
MWBase::Environment::get().getWorld ()->advanceTime (2); MWBase::Environment::get().getWorld ()->advanceTime (2);

View file

@ -9,6 +9,7 @@
#include "../mwbase/windowmanager.hpp" #include "../mwbase/windowmanager.hpp"
#include "../mwbase/mechanicsmanager.hpp" #include "../mwbase/mechanicsmanager.hpp"
#include "../mwbase/soundmanager.hpp" #include "../mwbase/soundmanager.hpp"
#include "../mwbase/dialoguemanager.hpp"
#include "../mwmechanics/creaturestats.hpp" #include "../mwmechanics/creaturestats.hpp"
@ -171,12 +172,13 @@ namespace MWGui
MWBase::Environment::get().getWorld()->advanceTime(hours); MWBase::Environment::get().getWorld()->advanceTime(hours);
} }
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Travel);
MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
// Teleports any followers, too. // Teleports any followers, too.
MWWorld::ActionTeleport action(interior ? cellname : "", pos); MWWorld::ActionTeleport action(interior ? cellname : "", pos);
action.execute(player); action.execute(player);
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Travel);
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
MWBase::Environment::get().getWindowManager()->fadeScreenOut(0); MWBase::Environment::get().getWindowManager()->fadeScreenOut(0);
MWBase::Environment::get().getWindowManager()->fadeScreenIn(1); MWBase::Environment::get().getWindowManager()->fadeScreenIn(1);
} }