1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwworld/actionteleport.cpp
Marc Zinnschlag 1dc805d0d4 Merge branch 'master' into exterior
Conflicts:
	apps/openmw/mwscript/docs/vmformat.txt
2010-09-08 15:38:19 +02:00

22 lines
531 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::execute (Environment& environment)
{
if (mCellName.empty())
environment.mWorld->changeToExteriorCell (mPosition);
else
environment.mWorld->changeCell (mCellName, mPosition);
}
}