mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 19:49:54 +00:00
21 lines
553 B
C++
21 lines
553 B
C++
|
|
#include "actionteleport.hpp"
|
|
|
|
#include "environment.hpp"
|
|
#include "world.hpp"
|
|
|
|
namespace MWWorld
|
|
{
|
|
ActionTeleportPlayer::ActionTeleportPlayer (const std::string& cellName,
|
|
const ESM::Position& position)
|
|
: mCellName (cellName), mPosition (position)
|
|
{}
|
|
|
|
void ActionTeleportPlayer::ActionTeleportPlayer::execute (Environment& environment)
|
|
{
|
|
if (mCellName.empty())
|
|
environment.mWorld->changeToExteriorCell (mPosition);
|
|
else
|
|
environment.mWorld->changeCell (mCellName, mPosition);
|
|
}
|
|
}
|