From bdd5e2f0645760594bff7e64961bdb1bf8c62574 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 20 Aug 2010 14:56:26 +0200 Subject: [PATCH] modified teleport action to support exteriors; coordinates are wrong here too --- apps/openmw/mwworld/actionteleport.cpp | 5 ++++- apps/openmw/mwworld/actionteleport.hpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/actionteleport.cpp b/apps/openmw/mwworld/actionteleport.cpp index 4edc02c30a..b9b48f18f1 100644 --- a/apps/openmw/mwworld/actionteleport.cpp +++ b/apps/openmw/mwworld/actionteleport.cpp @@ -13,6 +13,9 @@ namespace MWWorld void ActionTeleportPlayer::ActionTeleportPlayer::execute (Environment& environment) { - environment.mWorld->changeCell (mCellName, mPosition); + if (mCellName.empty()) + environment.mWorld->changeToExteriorCell (mPosition); + else + environment.mWorld->changeCell (mCellName, mPosition); } } diff --git a/apps/openmw/mwworld/actionteleport.hpp b/apps/openmw/mwworld/actionteleport.hpp index 78a55fba2f..e4c972a9e3 100644 --- a/apps/openmw/mwworld/actionteleport.hpp +++ b/apps/openmw/mwworld/actionteleport.hpp @@ -17,6 +17,7 @@ namespace MWWorld public: ActionTeleportPlayer (const std::string& cellName, const ESM::Position& position); + ///< If cellName is empty, an exterior cell is asumed. virtual void execute (Environment& environment); };