mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 19:19:55 +00:00
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
#ifndef GAME_MWMECHANICS_AIACTIVATE_H
|
|
#define GAME_MWMECHANICS_AIACTIVATE_H
|
|
|
|
#include "typedaipackage.hpp"
|
|
|
|
#include <string>
|
|
|
|
#include "pathfinding.hpp"
|
|
|
|
namespace ESM
|
|
{
|
|
namespace AiSequence
|
|
{
|
|
struct AiActivate;
|
|
}
|
|
}
|
|
|
|
namespace MWMechanics
|
|
{
|
|
/// \brief Causes actor to walk to activatable object and activate it
|
|
/** Will activate when close to object **/
|
|
class AiActivate final : public TypedAiPackage<AiActivate>
|
|
{
|
|
public:
|
|
/// Constructor
|
|
/** \param objectId Reference to object to activate **/
|
|
AiActivate(const std::string &objectId);
|
|
|
|
AiActivate(const ESM::AiSequence::AiActivate* activate);
|
|
|
|
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
|
|
int getTypeId() const final;
|
|
|
|
void writeState(ESM::AiSequence::AiSequence& sequence) const final;
|
|
|
|
private:
|
|
const std::string mObjectId;
|
|
};
|
|
}
|
|
#endif // GAME_MWMECHANICS_AIACTIVATE_H
|