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); };