1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/openmw/mwworld/actionteleport.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.2 KiB
C++
Raw Normal View History

#ifndef GAME_MWWORLD_ACTIONTELEPORT_H
#define GAME_MWWORLD_ACTIONTELEPORT_H
#include <set>
#include <string>
2022-08-27 13:07:59 +02:00
#include <string_view>
#include <components/esm/defs.hpp>
#include "action.hpp"
namespace MWWorld
{
2012-07-27 12:00:10 +02:00
class ActionTeleport : public Action
{
ESM::RefId mCellId;
ESM::Position mPosition;
bool mTeleportFollowers;
2022-09-22 21:26:05 +03:00
/// Teleports this actor and also teleports anyone following that actor.
void executeImp(const Ptr& actor) override;
2022-09-22 21:26:05 +03:00
/// Teleports only the given actor (internal use).
void teleport(const Ptr& actor);
2022-09-22 21:26:05 +03:00
public:
/// If cellName is empty, an exterior cell is assumed.
/// @param teleportFollowers Whether to teleport any following actors of the target actor as well.
ActionTeleport(ESM::RefId cellId, const ESM::Position& position, bool teleportFollowers);
2022-09-22 21:26:05 +03:00
/// @param includeHostiles If true, include hostile followers (which won't actually be teleported) in the
/// output,
/// e.g. so that the teleport action can calm them.
static void getFollowers(
const MWWorld::Ptr& actor, std::set<MWWorld::Ptr>& out, bool toExterior, bool includeHostiles = false);
};
}
#endif