2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/World/CPatterned.hpp"
|
2020-09-05 21:51:21 +00:00
|
|
|
#include "Runtime/Collision/CJointCollisionDescription.hpp"
|
|
|
|
namespace urde {
|
|
|
|
class CCollisionActorManager;
|
|
|
|
struct SSphereJointInfo;
|
|
|
|
namespace MP1 {
|
2018-12-08 05:30:43 +00:00
|
|
|
class CThardusRockProjectile : public CPatterned {
|
2020-09-05 06:04:28 +00:00
|
|
|
float x568_ = 1.f;
|
2020-03-01 01:11:41 +00:00
|
|
|
u32 x56c_ = 0;
|
|
|
|
TUniqueId x570_ = kInvalidUniqueId;
|
|
|
|
bool x572_ = false;
|
2020-09-05 06:04:28 +00:00
|
|
|
EAnimState x574_ = EAnimState::Invalid;
|
2020-09-05 21:51:21 +00:00
|
|
|
std::unique_ptr<CCollisionActorManager> x578_collisionManager;
|
|
|
|
std::vector<CStaticRes> x57c_; // Used to be a pointers to CModelData
|
|
|
|
std::vector<TUniqueId> x58c_destroyableRocks;
|
2020-09-05 06:04:28 +00:00
|
|
|
CAssetId x59c_stateMachine;
|
|
|
|
u32 x5a0_ = 0;
|
|
|
|
bool x5a4_ = true;
|
|
|
|
float x5a8_ = 0.f;
|
|
|
|
float x5ac_ = 0.f;
|
|
|
|
zeus::CVector3f x5b0_ = zeus::skForward;
|
|
|
|
bool x5bc_ = true;
|
|
|
|
float x5c0_;
|
|
|
|
u32 x5c4_ = 0;
|
|
|
|
u32 x5c8_ = 0;
|
|
|
|
u32 x5cc_ = 0;
|
|
|
|
TUniqueId x5d0_thardusId = kInvalidUniqueId;
|
|
|
|
u32 x5d4_ = 0;
|
|
|
|
u32 x5d8_ = 0;
|
|
|
|
bool x5dc_ = false;
|
|
|
|
bool x5dd_ = false;
|
2020-09-05 21:51:21 +00:00
|
|
|
bool x5de_;
|
|
|
|
void DoExplosion(CStateManager& mgr, CAssetId particleId, const zeus::CVector3f& pos, const zeus::CVector3f& scale, u32 w2);
|
|
|
|
void ExplodeAndShake(CStateManager& mgr, const zeus::CVector3f& pos);
|
|
|
|
void ModifyActorMaterial(CStateManager& mgr, bool remove, EMaterialTypes mat);
|
|
|
|
void SetChildrenActive(CStateManager& mgr, bool active);
|
|
|
|
void InitializeCollisionManager(CStateManager& mgr);
|
|
|
|
void AddSphereCollisionList(const SSphereJointInfo* info, size_t count, std::vector<CJointCollisionDescription>& vecOut);
|
|
|
|
void SetMaterialProperties(const std::unique_ptr<CCollisionActorManager>& colMgr, CStateManager& mgr);
|
|
|
|
void UpdateDestroyableRockPositions(CStateManager& mgr);
|
|
|
|
void UpdateDestroyableRockCollisionActors(CStateManager& mgr);
|
2017-06-12 04:23:34 +00:00
|
|
|
public:
|
2020-08-23 19:03:33 +00:00
|
|
|
DEFINE_PATTERNED(ThardusRockProjectile);
|
2018-12-08 05:30:43 +00:00
|
|
|
CThardusRockProjectile(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
|
|
|
|
CModelData&& modelData, const CActorParameters& aParms, const CPatternedInfo& patternedInfo,
|
2020-09-05 21:51:21 +00:00
|
|
|
std::vector<CStaticRes>&& mDataVec, CAssetId stateMachine, float);
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2020-09-05 06:04:28 +00:00
|
|
|
void Think(float dt, CStateManager& mgr) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId other, CStateManager& mgr) override;
|
|
|
|
void Render(CStateManager& mgr) override;
|
2020-03-01 01:11:41 +00:00
|
|
|
void sub80203d58() {
|
|
|
|
x328_25_verticalMovement = false;
|
2020-09-13 19:03:49 +00:00
|
|
|
Stop();
|
2020-03-01 01:11:41 +00:00
|
|
|
x150_momentum = {0.f, 0.f, 2.f * -GetWeight()};
|
2020-09-05 21:51:21 +00:00
|
|
|
x56c_ = 3;
|
2020-03-01 01:11:41 +00:00
|
|
|
}
|
2020-09-05 06:04:28 +00:00
|
|
|
|
|
|
|
void Patrol(CStateManager& mgr, EStateMsg msg, float dt) override;
|
|
|
|
void Dead(CStateManager& mgr, EStateMsg msg, float dt) override;
|
|
|
|
void LoopedAttack(CStateManager& mgr, EStateMsg msg, float dt) override;
|
|
|
|
void GetUp(CStateManager& mgr, EStateMsg msg, float dt) override;
|
|
|
|
void Lurk(CStateManager& mgr, EStateMsg msg, float dt) override;
|
|
|
|
bool Delay(CStateManager& mgr, float arg) override;
|
|
|
|
bool AnimOver(CStateManager& mgr, float arg) override;
|
|
|
|
bool ShouldAttack(CStateManager& mgr, float arg) override;
|
|
|
|
bool HitSomething(CStateManager& mgr, float arg) override;
|
|
|
|
bool ShouldMove(CStateManager& mgr, float arg) override;
|
2020-03-01 01:11:41 +00:00
|
|
|
};
|
2020-09-05 21:51:21 +00:00
|
|
|
} // namespace MP1
|
|
|
|
} // namespace urde
|