2010-08-03 16:44:52 +00:00
|
|
|
#ifndef GAME_MWWORLD_ACTIONTELEPORT_H
|
|
|
|
#define GAME_MWWORLD_ACTIONTELEPORT_H
|
|
|
|
|
2016-12-23 20:27:29 +00:00
|
|
|
#include <set>
|
2010-08-03 16:44:52 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <components/esm/defs.hpp>
|
|
|
|
|
|
|
|
#include "action.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
2012-07-27 10:00:10 +00:00
|
|
|
class ActionTeleport : public Action
|
2010-08-03 16:44:52 +00:00
|
|
|
{
|
|
|
|
std::string mCellName;
|
|
|
|
ESM::Position mPosition;
|
2015-05-22 17:56:39 +00:00
|
|
|
bool mTeleportFollowers;
|
2010-08-03 16:44:52 +00:00
|
|
|
|
2014-08-24 20:51:47 +00:00
|
|
|
/// Teleports this actor and also teleports anyone following that actor.
|
2012-07-27 10:00:10 +00:00
|
|
|
virtual void executeImp (const Ptr& actor);
|
|
|
|
|
2014-08-24 20:51:47 +00:00
|
|
|
/// Teleports only the given actor (internal use).
|
|
|
|
void teleport(const Ptr &actor);
|
|
|
|
|
2010-08-03 16:44:52 +00:00
|
|
|
public:
|
|
|
|
|
2016-12-26 20:46:43 +00:00
|
|
|
/// If cellName is empty, an exterior cell is assumed.
|
2015-05-22 17:56:39 +00:00
|
|
|
/// @param teleportFollowers Whether to teleport any following actors of the target actor as well.
|
2016-12-23 20:27:29 +00:00
|
|
|
ActionTeleport (const std::string& cellName, const ESM::Position& position, bool teleportFollowers);
|
|
|
|
|
|
|
|
/// Outputs every actor follower who is in teleport range and wasn't ordered to not enter interiors
|
|
|
|
static void getFollowersToTeleport(const MWWorld::Ptr& actor, std::set<MWWorld::Ptr>& out);
|
2010-08-03 16:44:52 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|