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

22 lines
576 B
C++
Raw Normal View History

#include "actionteleport.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
namespace MWWorld
{
2012-07-27 12:00:10 +02:00
ActionTeleport::ActionTeleport (const std::string& cellName,
const ESM::Position& position)
: mCellName (cellName), mPosition (position)
{}
2012-07-27 12:00:10 +02:00
void ActionTeleport::executeImp (const Ptr& actor)
{
if (mCellName.empty())
MWBase::Environment::get().getWorld()->changeToExteriorCell (mPosition);
else
MWBase::Environment::get().getWorld()->changeToInteriorCell (mCellName, mPosition);
}
}