1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 19:49:54 +00:00
openmw-tes3mp/apps/openmw/mwworld/actionteleport.cpp

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