1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:19:56 +00:00
openmw-tes3mp/apps/openmw/mwmechanics/aiactivate.hpp

42 lines
1.1 KiB
C++
Raw Normal View History

2012-11-15 21:22:44 +00:00
#ifndef GAME_MWMECHANICS_AIACTIVATE_H
#define GAME_MWMECHANICS_AIACTIVATE_H
2014-04-01 18:15:55 +00:00
#include "aipackage.hpp"
2016-06-17 14:07:16 +00:00
2014-04-01 18:15:55 +00:00
#include <string>
#include "pathfinding.hpp"
2014-06-12 21:27:04 +00:00
namespace ESM
{
namespace AiSequence
{
struct AiActivate;
}
}
2014-04-01 18:15:55 +00:00
namespace MWMechanics
2014-06-12 21:27:04 +00:00
{
/// \brief Causes actor to walk to activatable object and activate it
/** Will activate when close to object **/
class AiActivate final : public AiPackage
2012-11-16 17:38:15 +00:00
{
2014-06-12 21:27:04 +00:00
public:
/// Constructor
/** \param objectId Reference to object to activate **/
AiActivate(const std::string &objectId);
2014-06-12 21:27:04 +00:00
AiActivate(const ESM::AiSequence::AiActivate* activate);
AiActivate *clone() const final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
int getTypeId() const final;
2012-11-15 21:22:44 +00:00
void writeState(ESM::AiSequence::AiSequence& sequence) const final;
2014-06-12 21:27:04 +00:00
2014-04-01 18:15:55 +00:00
private:
2012-11-16 19:28:20 +00:00
std::string mObjectId;
2012-11-16 17:38:15 +00:00
};
2012-11-15 21:22:44 +00:00
}
#endif // GAME_MWMECHANICS_AIACTIVATE_H