1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwmechanics/aiactivate.hpp
Thomas cbfa282f8d Changed implementations of aifollow/pursue/activate slightly, added ability for NPCs to go through unlocked doors (They even try locked ones), and step back from opening doors (Although it still needs some work)
Notes - When the door hits them while it's about to finish closing they will try to walk through the door.
      - Considerably more works is needed in making the NPC work out troublesome areas where they get stuck
2014-05-13 03:58:32 -04:00

30 lines
869 B
C++

#ifndef GAME_MWMECHANICS_AIACTIVATE_H
#define GAME_MWMECHANICS_AIACTIVATE_H
#include "aipackage.hpp"
#include <string>
#include "pathfinding.hpp"
namespace MWMechanics
{
/// \brief Causes actor to walk to activatable object and activate it
/** Will actiavte when close to object or path grid complete **/
class AiActivate : public AiPackage
{
public:
/// Constructor
/** \param objectId Reference to object to activate **/
AiActivate(const std::string &objectId);
virtual AiActivate *clone() const;
virtual bool execute (const MWWorld::Ptr& actor,float duration);
virtual int getTypeId() const;
private:
std::string mObjectId;
int mCellX;
int mCellY;
};
}
#endif // GAME_MWMECHANICS_AIACTIVATE_H