forked from mirror/openmw-tes3mp
implemented teleport doors (only for the player for now)
parent
7e5ddae3b3
commit
002345270b
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
#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::ActionTeleportPlayer::execute (Environment& environment)
|
||||||
|
{
|
||||||
|
environment.mWorld->changeCell (mCellName, mPosition);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
#ifndef GAME_MWWORLD_ACTIONTELEPORT_H
|
||||||
|
#define GAME_MWWORLD_ACTIONTELEPORT_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <components/esm/defs.hpp>
|
||||||
|
|
||||||
|
#include "action.hpp"
|
||||||
|
|
||||||
|
namespace MWWorld
|
||||||
|
{
|
||||||
|
class ActionTeleportPlayer : public Action
|
||||||
|
{
|
||||||
|
std::string mCellName;
|
||||||
|
ESM::Position mPosition;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
ActionTeleportPlayer (const std::string& cellName, const ESM::Position& position);
|
||||||
|
|
||||||
|
virtual void execute (Environment& environment);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue