2017-07-25 05:51:55 +00:00
|
|
|
#ifndef GAME_MWMECHANICS_AIBREATHE_H
|
|
|
|
#define GAME_MWMECHANICS_AIBREATHE_H
|
|
|
|
|
2020-05-17 20:10:36 +00:00
|
|
|
#include "typedaipackage.hpp"
|
2017-07-25 05:51:55 +00:00
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
/// \brief AiPackage to have an actor resurface to breathe
|
|
|
|
// The AI will go up if lesser than half breath left
|
2020-05-17 20:10:36 +00:00
|
|
|
class AiBreathe final : public TypedAiPackage<AiBreathe>
|
2017-07-25 05:51:55 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-05-16 16:56:02 +00:00
|
|
|
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
|
2017-07-25 05:51:55 +00:00
|
|
|
|
2020-05-16 16:56:02 +00:00
|
|
|
int getTypeId() const final;
|
2017-07-25 05:51:55 +00:00
|
|
|
|
2020-05-16 16:56:02 +00:00
|
|
|
unsigned int getPriority() const final;
|
2017-07-25 05:51:55 +00:00
|
|
|
|
2020-05-16 16:56:02 +00:00
|
|
|
bool canCancel() const final { return false; }
|
|
|
|
bool shouldCancelPreviousAi() const final { return false; }
|
2017-07-25 05:51:55 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|