forked from teamnwah/openmw-tes3coop
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.
22 lines
531 B
C++
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);
|
|
}
|
|
}
|