1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 09:49:55 +00:00
openmw-tes3mp/apps/openmw/mwworld/actionteleport.cpp
Marc Zinnschlag d0cebea580 some cleanup
2012-08-26 18:50:47 +02:00

22 lines
596 B
C++

#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);
}
}