metaforce/Runtime/World/CAmbientAI.hpp

43 lines
1.3 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2018-06-04 19:30:04 +00:00
#include "CPhysicsActor.hpp"
#include "CDamageVulnerability.hpp"
2018-12-08 05:30:43 +00:00
namespace urde {
class CAmbientAI : public CPhysicsActor {
enum class EAnimationState { Ready, Alert, Impact };
2018-06-04 19:30:04 +00:00
2018-12-08 05:30:43 +00:00
CHealthInfo x258_initialHealthInfo;
CHealthInfo x260_healthInfo;
CDamageVulnerability x268_dVuln;
EAnimationState x2d0_animState = EAnimationState::Ready;
float x2d4_alertRange;
float x2d8_impactRange;
s32 x2dc_defaultAnim;
s32 x2e0_alertAnim;
s32 x2e4_impactAnim;
2018-06-04 19:30:04 +00:00
2018-12-08 05:30:43 +00:00
union {
struct {
bool x2e8_24_dead : 1;
bool x2e8_25_animating : 1;
2018-06-04 19:30:04 +00:00
};
2018-12-08 05:30:43 +00:00
u32 _dummy = 0;
};
2018-06-04 19:30:04 +00:00
public:
2018-12-08 05:30:43 +00:00
CAmbientAI(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
const zeus::CAABox&, const CMaterialList&, float, const CHealthInfo&, const CDamageVulnerability&,
const CActorParameters&, float, float, s32, s32, bool);
2018-06-04 19:30:04 +00:00
2018-12-08 05:30:43 +00:00
void Accept(IVisitor&);
void Think(float, CStateManager&);
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
CHealthInfo* HealthInfo(CStateManager&) { return &x260_healthInfo; }
const CDamageVulnerability* GetDamageVulnerability() const { return &x268_dVuln; }
2019-01-29 08:28:35 +00:00
rstl::optional<zeus::CAABox> GetTouchBounds() const;
2018-12-08 05:30:43 +00:00
void Touch(CActor&, CStateManager&) {}
void RandomizePlaybackRate(CStateManager&);
2018-06-04 19:30:04 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde