mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 01:06:42 +00:00
modified teleport action to support exteriors; coordinates are wrong here too
This commit is contained in:
parent
0111631ee9
commit
bdd5e2f064
2 changed files with 5 additions and 1 deletions
|
@ -13,6 +13,9 @@ namespace MWWorld
|
||||||
|
|
||||||
void ActionTeleportPlayer::ActionTeleportPlayer::execute (Environment& environment)
|
void ActionTeleportPlayer::ActionTeleportPlayer::execute (Environment& environment)
|
||||||
{
|
{
|
||||||
|
if (mCellName.empty())
|
||||||
|
environment.mWorld->changeToExteriorCell (mPosition);
|
||||||
|
else
|
||||||
environment.mWorld->changeCell (mCellName, mPosition);
|
environment.mWorld->changeCell (mCellName, mPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace MWWorld
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ActionTeleportPlayer (const std::string& cellName, const ESM::Position& position);
|
ActionTeleportPlayer (const std::string& cellName, const ESM::Position& position);
|
||||||
|
///< If cellName is empty, an exterior cell is asumed.
|
||||||
|
|
||||||
virtual void execute (Environment& environment);
|
virtual void execute (Environment& environment);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue