1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

modified teleport action to support exteriors; coordinates are wrong here too

This commit is contained in:
Marc Zinnschlag 2010-08-20 14:56:26 +02:00
parent 0111631ee9
commit bdd5e2f064
2 changed files with 5 additions and 1 deletions

View File

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

View File

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