|
|
|
@ -25,12 +25,14 @@ namespace
|
|
|
|
|
namespace MWWorld
|
|
|
|
|
{
|
|
|
|
|
ActionTeleport::ActionTeleport (const std::string& cellName,
|
|
|
|
|
const ESM::Position& position)
|
|
|
|
|
: Action (true), mCellName (cellName), mPosition (position)
|
|
|
|
|
const ESM::Position& position, bool teleportFollowers)
|
|
|
|
|
: Action (true), mCellName (cellName), mPosition (position), mTeleportFollowers(teleportFollowers)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ActionTeleport::executeImp (const Ptr& actor)
|
|
|
|
|
{
|
|
|
|
|
if (mTeleportFollowers)
|
|
|
|
|
{
|
|
|
|
|
//find any NPC that is following the actor and teleport him too
|
|
|
|
|
std::set<MWWorld::Ptr> followers;
|
|
|
|
@ -43,6 +45,7 @@ namespace MWWorld
|
|
|
|
|
<= 800*800)
|
|
|
|
|
teleport(*it);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
teleport(actor);
|
|
|
|
|
}
|
|
|
|
|