2018-10-11 22:57:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/World/CPathFindSearch.hpp"
|
|
|
|
#include "Runtime/World/CPatterned.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CTransform.hpp>
|
2018-10-11 22:57:05 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde::MP1 {
|
|
|
|
class CTryclops : public CPatterned {
|
2019-07-16 15:54:07 +00:00
|
|
|
|
|
|
|
static const CDamageVulnerability skVulnerabilities;
|
|
|
|
CPathFindSearch x568_pathFindSearch;
|
|
|
|
zeus::CTransform x64c_;
|
|
|
|
float x67c_;
|
|
|
|
float x680_;
|
|
|
|
float x684_;
|
2019-07-16 22:28:14 +00:00
|
|
|
float x688_launchSpeed;
|
2019-07-16 15:54:07 +00:00
|
|
|
float x68c_ = 0.f;
|
|
|
|
u32 x690_ = 0;
|
|
|
|
TUniqueId x694_bombId = kInvalidUniqueId;
|
|
|
|
TUniqueId x696_ = kInvalidUniqueId;
|
2020-04-21 07:22:41 +00:00
|
|
|
bool x698_24_ : 1 = false;
|
|
|
|
bool x698_25_ : 1 = false;
|
|
|
|
bool x698_26_ : 1 = false;
|
|
|
|
bool x698_27_dizzy : 1 = false;
|
2020-07-12 09:58:48 +00:00
|
|
|
bool sub8025dbd0(CStateManager& mgr);
|
2019-07-16 15:54:07 +00:00
|
|
|
void LaunchPlayer(CStateManager& mgr, const zeus::CTransform& xf, float);
|
|
|
|
void DragBomb(CStateManager& mgr, const zeus::CTransform& xf);
|
|
|
|
void ApplySeparation(CStateManager&);
|
|
|
|
void GrabBomb(CStateManager& mgr);
|
|
|
|
void DragPlayer(CStateManager& mgr, const zeus::CVector3f& locOrig);
|
2019-08-14 10:04:11 +00:00
|
|
|
bool InRangeToLocator(const zeus::CVector3f& vec, float) const;
|
2019-07-16 15:54:07 +00:00
|
|
|
bool sub80260180(const zeus::CVector3f&, const zeus::CVector3f&, const zeus::CAABox&, CStateManager&);
|
|
|
|
void SuckPlayer(CStateManager& mgr, float);
|
|
|
|
void AttractPlayer(CStateManager& mgr, const zeus::CVector3f& dest, float);
|
2019-07-16 22:28:14 +00:00
|
|
|
void AttractBomb(CStateManager& mgr, float);
|
2019-07-16 15:54:07 +00:00
|
|
|
|
2018-10-11 22:57:05 +00:00
|
|
|
public:
|
2020-08-23 19:03:33 +00:00
|
|
|
DEFINE_PATTERNED(Tryclops);
|
2020-07-12 09:58:48 +00:00
|
|
|
CTryclops(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
|
|
|
|
CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, float f1, float f2,
|
|
|
|
float f3, float launchSpeed);
|
2019-01-31 20:44:05 +00:00
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void Think(float, CStateManager&) override;
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability() const override {
|
2019-07-16 15:54:07 +00:00
|
|
|
if (x698_26_)
|
|
|
|
return CAi::GetDamageVulnerability();
|
|
|
|
|
|
|
|
return &skVulnerabilities;
|
|
|
|
}
|
|
|
|
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&,
|
2019-08-09 19:46:49 +00:00
|
|
|
const CDamageInfo&) const override {
|
2019-07-16 15:54:07 +00:00
|
|
|
if (x698_26_)
|
|
|
|
return CAi::GetDamageVulnerability();
|
|
|
|
|
|
|
|
return &skVulnerabilities;
|
|
|
|
}
|
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float) override;
|
|
|
|
void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override;
|
|
|
|
bool IsListening() const override { return true; }
|
|
|
|
void Patrol(CStateManager&, EStateMsg, float) override;
|
|
|
|
void PathFind(CStateManager&, EStateMsg, float) override;
|
|
|
|
void SelectTarget(CStateManager&, EStateMsg, float) override;
|
|
|
|
void TargetPatrol(CStateManager&, EStateMsg, float) override;
|
|
|
|
void TargetPlayer(CStateManager&, EStateMsg, float) override;
|
|
|
|
void TargetCover(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Attack(CStateManager&, EStateMsg, float) override;
|
|
|
|
void JumpBack(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Shuffle(CStateManager&, EStateMsg, float) override;
|
|
|
|
void TurnAround(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Crouch(CStateManager&, EStateMsg, float) override;
|
|
|
|
void GetUp(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Suck(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Cover(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Approach(CStateManager&, EStateMsg, float) override;
|
|
|
|
void PathFindEx(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Dizzy(CStateManager&, EStateMsg, float) override;
|
|
|
|
bool InAttackPosition(CStateManager&, float) override;
|
|
|
|
bool InRange(CStateManager&, float) override;
|
|
|
|
bool InMaxRange(CStateManager&, float) override;
|
|
|
|
bool InDetectionRange(CStateManager&, float) override;
|
|
|
|
bool SpotPlayer(CStateManager&, float) override;
|
|
|
|
bool InPosition(CStateManager&, float) override;
|
|
|
|
bool HearShot(CStateManager&, float) override;
|
|
|
|
bool CoverBlown(CStateManager&, float) override;
|
|
|
|
bool Inside(CStateManager&, float) override;
|
|
|
|
bool ShouldRetreat(CStateManager&, float) override;
|
|
|
|
bool IsDizzy(CStateManager&, float) override;
|
|
|
|
CPathFindSearch* GetSearchPath() override { return &x568_pathFindSearch; }
|
2018-10-11 22:57:05 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde::MP1
|