From bcd9cc4baa06c70150e0ce31eecc418da7db6ff5 Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Wed, 8 Aug 2018 02:05:12 +0300 Subject: [PATCH 1/2] Check the actor cell instead of the destination cell in fast travel price logic --- CHANGELOG.md | 1 + apps/openmw/mwgui/travelwindow.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a28661372..bb3c6bb7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ Bug #4553: Forcegreeting on non-actor opens a dialogue window which cannot be closed Bug #4557: Topics with reserved names are handled differently from vanilla Bug #4558: Mesh optimizer: check for reserved node name is case-sensitive + Bug #4563: Fast travel price logic checks destination cell instead of service actor cell Feature #2606: Editor: Implemented (optional) case sensitive global search Feature #3083: Play animation when NPC is casting spell via script Feature #3103: Provide option for disposition to get increased by successful trade diff --git a/apps/openmw/mwgui/travelwindow.cpp b/apps/openmw/mwgui/travelwindow.cpp index 7b65eb771..991b93a62 100644 --- a/apps/openmw/mwgui/travelwindow.cpp +++ b/apps/openmw/mwgui/travelwindow.cpp @@ -46,7 +46,7 @@ namespace MWGui mSelect->getHeight()); } - void TravelWindow::addDestination(const std::string& name,ESM::Position pos,bool interior) + void TravelWindow::addDestination(const std::string& name, ESM::Position pos, bool interior) { int price; @@ -56,7 +56,7 @@ namespace MWGui MWWorld::Ptr player = MWBase::Environment::get().getWorld ()->getPlayerPtr(); int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId); - if(interior) + if (!mPtr.getCell()->isExterior()) { price = gmst.find("fMagesGuildTravel")->getInt(); } From e9e9c0dd6b3873fc8968b11279032072c1a2de2d Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Wed, 8 Aug 2018 12:27:18 +0300 Subject: [PATCH 2/2] Fix guild guide fast travelling to exteriors time --- apps/openmw/mwgui/travelwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/travelwindow.cpp b/apps/openmw/mwgui/travelwindow.cpp index 991b93a62..7a4a9293c 100644 --- a/apps/openmw/mwgui/travelwindow.cpp +++ b/apps/openmw/mwgui/travelwindow.cpp @@ -168,7 +168,7 @@ namespace MWGui ESM::Position pos = *_sender->getUserData(); std::string cellname = _sender->getUserString("Destination"); bool interior = _sender->getUserString("interior") == "y"; - if (!interior) + if (mPtr.getCell()->isExterior()) { ESM::Position playerPos = player.getRefData().getPosition(); float d = (osg::Vec3f(pos.pos[0], pos.pos[1], 0) - osg::Vec3f(playerPos.pos[0], playerPos.pos[1], 0)).length();