You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
#include "actionteleport.hpp"
|
|
|
|
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
ActionTeleport::ActionTeleport (const std::string& cellName,
|
|
|
|
const ESM::Position& position)
|
|
|
|
: Action (true), mCellName (cellName), mPosition (position)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ActionTeleport::executeImp (const Ptr& actor)
|
|
|
|
{
|
|
|
|
if (mCellName.empty())
|
|
|
|
MWBase::Environment::get().getWorld()->changeToExteriorCell (mPosition);
|
|
|
|
else
|
|
|
|
MWBase::Environment::get().getWorld()->changeToInteriorCell (mCellName, mPosition);
|
|
|
|
}
|
|
|
|
}
|