mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
0871d45790
Example for a few values shown in AiWander.
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
#ifndef GAME_MWMECHANICS_AIACTIVATE_H
|
|
#define GAME_MWMECHANICS_AIACTIVATE_H
|
|
|
|
#include "aipackage.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 : public AiPackage
|
|
{
|
|
public:
|
|
/// Constructor
|
|
/** \param objectId Reference to object to activate **/
|
|
AiActivate(const std::string &objectId);
|
|
|
|
AiActivate(const ESM::AiSequence::AiActivate* activate);
|
|
|
|
virtual AiActivate *clone() const;
|
|
virtual bool execute (const MWWorld::Ptr& actor, AiState& state, float duration);
|
|
virtual int getTypeId() const;
|
|
|
|
virtual void writeState(ESM::AiSequence::AiSequence& sequence) const;
|
|
|
|
private:
|
|
std::string mObjectId;
|
|
};
|
|
}
|
|
#endif // GAME_MWMECHANICS_AIACTIVATE_H
|