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:
parent
0111631ee9
commit
bdd5e2f064
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user