1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/apps/openmw/mwworld/actionteleport.cpp

22 lines
541 B
C++
Raw Normal View History

#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)
{}
2010-08-30 01:12:54 +00:00
void ActionTeleportPlayer::execute (Environment& environment)
{
if (mCellName.empty())
environment.mWorld->changeToExteriorCell (mPosition);
else
2011-02-10 09:38:45 +00:00
environment.mWorld->changeToInteriorCell (mCellName, mPosition);
}
}