1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwworld/actionteleport.cpp

23 lines
565 B
C++

#include "actionteleport.hpp"
#include "../mwbase/environment.hpp"
#include "world.hpp"
namespace MWWorld
{
ActionTeleportPlayer::ActionTeleportPlayer (const std::string& cellName,
const ESM::Position& position)
: mCellName (cellName), mPosition (position)
{}
void ActionTeleportPlayer::execute()
{
if (mCellName.empty())
MWBase::Environment::get().getWorld()->changeToExteriorCell (mPosition);
else
MWBase::Environment::get().getWorld()->changeToInteriorCell (mCellName, mPosition);
}
}