2019-06-10 00:09:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/Collision/CCollisionActorManager.hpp"
|
|
|
|
#include "Runtime/World/CPatterned.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2019-06-10 00:09:07 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce::MP1 {
|
2019-06-10 00:09:07 +00:00
|
|
|
class CFlaahgraTentacle : public CPatterned {
|
|
|
|
s32 x568_ = -1;
|
|
|
|
std::unique_ptr<CCollisionActorManager> x56c_collisionManager;
|
|
|
|
float x570_ = 0.f;
|
|
|
|
float x574_ = 0.f;
|
|
|
|
float x578_ = 0.f;
|
|
|
|
TUniqueId x57c_tentacleTipAct = kInvalidUniqueId;
|
|
|
|
zeus::CVector3f x580_forceVector;
|
|
|
|
TUniqueId x58c_triggerId = kInvalidUniqueId;
|
2020-04-21 07:22:41 +00:00
|
|
|
bool x58e_24_ : 1 = false;
|
2019-06-10 00:09:07 +00:00
|
|
|
|
2020-04-09 21:38:03 +00:00
|
|
|
void AddSphereCollisionList(const SSphereJointInfo* sphereJoints, size_t jointCount,
|
|
|
|
std::vector<CJointCollisionDescription>& outJoints);
|
2019-06-10 00:09:07 +00:00
|
|
|
void SetupCollisionManager(CStateManager&);
|
|
|
|
void ExtractTentacle(CStateManager&);
|
|
|
|
void RetractTentacle(CStateManager&);
|
|
|
|
void SaveBombSlotInfo(CStateManager&);
|
2020-08-14 05:08:11 +00:00
|
|
|
|
2019-06-10 00:09:07 +00:00
|
|
|
public:
|
|
|
|
DEFINE_PATTERNED(FlaahgraTentacle);
|
|
|
|
CFlaahgraTentacle(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
|
|
|
|
const CPatternedInfo&, const CActorParameters&);
|
|
|
|
|
2020-08-14 05:08:11 +00:00
|
|
|
void Accept(IVisitor&) override;
|
2019-08-09 19:46:49 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void Think(float, CStateManager&) override;
|
2019-06-10 00:09:07 +00:00
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
zeus::CVector3f GetAimPosition(const CStateManager&, float) const override;
|
2019-06-10 00:09:07 +00:00
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
bool Inside(CStateManager&, float) override {
|
|
|
|
return x450_bodyController->GetLocomotionType() == pas::ELocomotionType::Crouch;
|
|
|
|
}
|
|
|
|
bool AnimOver(CStateManager&, float) override { return x568_ == 3; }
|
|
|
|
bool ShouldAttack(CStateManager&, float) override;
|
2019-06-10 00:09:07 +00:00
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
void Dead(CStateManager&, EStateMsg, float) override {
|
|
|
|
x450_bodyController->SetLocomotionType(pas::ELocomotionType::Crouch);
|
|
|
|
}
|
|
|
|
void Attack(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Retreat(CStateManager&, EStateMsg, float) override;
|
|
|
|
void InActive(CStateManager&, EStateMsg, float) override;
|
2020-08-14 05:08:11 +00:00
|
|
|
void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override;
|
2019-06-10 00:09:07 +00:00
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce::MP1
|