2020-03-31 13:38:18 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-04-04 11:46:22 +00:00
|
|
|
#include "Runtime/Collision/CCollidableSphere.hpp"
|
2020-03-31 13:38:18 +00:00
|
|
|
#include "Runtime/World/CPatterned.hpp"
|
2020-04-04 11:46:22 +00:00
|
|
|
#include "Runtime/World/CPathFindSearch.hpp"
|
2020-03-31 13:38:18 +00:00
|
|
|
#include "Runtime/World/CVisorFlare.hpp"
|
|
|
|
|
2020-04-05 07:31:34 +00:00
|
|
|
namespace urde {
|
|
|
|
class CWeaponDescription;
|
|
|
|
namespace MP1 {
|
2020-03-31 13:38:18 +00:00
|
|
|
class CDrone : public CPatterned {
|
2020-04-04 11:46:22 +00:00
|
|
|
CAssetId x568_;
|
|
|
|
TLockedToken<CCollisionResponseData> x56c_;
|
|
|
|
CCollisionResponseData* x574_;
|
2020-04-04 13:55:08 +00:00
|
|
|
TUniqueId x578_lightId = kInvalidUniqueId;
|
2020-04-04 11:46:22 +00:00
|
|
|
TUniqueId x57a_ = kInvalidUniqueId;
|
|
|
|
std::vector<CVisorFlare::CFlareDef> x57c_flares;
|
|
|
|
u32 x58c_ = 2;
|
|
|
|
CDamageInfo x590_;
|
|
|
|
CDamageInfo x5ac_;
|
|
|
|
float x5c8_ = 0.f;
|
|
|
|
float x5cc_ = 0.f;
|
|
|
|
float x5d0_ = 0.f;
|
|
|
|
float x5d4_ = 0.f;
|
|
|
|
float x5d8_ = 0.f;
|
|
|
|
float x5dc_ = 0.f;
|
|
|
|
float x5e0_ = 0.f;
|
|
|
|
float x5e4_;
|
2020-04-05 07:31:34 +00:00
|
|
|
float x5e8_shieldTime = 0.f;
|
|
|
|
float x5ec_turnSpeed;
|
2020-04-04 11:46:22 +00:00
|
|
|
float x5f0_;
|
|
|
|
float x5f4_;
|
|
|
|
float x5f8_;
|
|
|
|
float x5fc_;
|
|
|
|
float x600_;
|
|
|
|
float x604_ = 0.f;
|
|
|
|
float x608_;
|
|
|
|
float x60c_;
|
|
|
|
float x610_;
|
|
|
|
float x614_;
|
|
|
|
float x618_;
|
|
|
|
float x61c_;
|
|
|
|
float x620_;
|
|
|
|
float x624_ = 0.f;
|
|
|
|
float x628_ = 0.f;
|
|
|
|
float x62c_ = 0.f;
|
|
|
|
float x630_ = 0.f;
|
|
|
|
float x634_ = 0.f;
|
|
|
|
float x638_ = 0.f;
|
|
|
|
float x63c_;
|
|
|
|
float x640_;
|
|
|
|
float x644_ = 0.f;
|
|
|
|
float x648_;
|
|
|
|
float x64c_;
|
|
|
|
float x650_;
|
|
|
|
float x654_;
|
|
|
|
float x658_;
|
|
|
|
float x65c_;
|
|
|
|
float x660_;
|
|
|
|
float x664_;
|
|
|
|
float x668_ = 0.f;
|
|
|
|
float x66c_ = 0.f;
|
|
|
|
zeus::CVector3f x670_;
|
|
|
|
zeus::CVector3f x67c_;
|
2020-04-04 13:55:08 +00:00
|
|
|
TUniqueId x688_teamMgr = kInvalidUniqueId;
|
2020-04-04 11:46:22 +00:00
|
|
|
CCollidableSphere x690_;
|
|
|
|
CPathFindSearch x6b0_pathFind;
|
|
|
|
zeus::CAxisAngle x794_;
|
|
|
|
zeus::CVector3f x7a0_;
|
|
|
|
float x7ac_ = 0.f;
|
|
|
|
float x7b0_ = 0.f;
|
|
|
|
float x7b4_ = 0.f;
|
|
|
|
float x7b8_ = 0.f;
|
|
|
|
float x7bc_ = 0.f;
|
|
|
|
s32 x7c8_ = 0;
|
|
|
|
s16 x7cc_;
|
2020-04-04 13:55:08 +00:00
|
|
|
CSfxHandle x7d0_;
|
2020-04-05 07:31:34 +00:00
|
|
|
rstl::reserved_vector<TUniqueId, 2> x7d4_ = {{kInvalidUniqueId, kInvalidUniqueId}};
|
|
|
|
rstl::reserved_vector<zeus::CVector3f, 2> x7e0_ = {{zeus::skZero3f, zeus::skZero3f}};
|
|
|
|
rstl::reserved_vector<zeus::CVector3f, 2> x7fc_ = {{zeus::skZero3f, zeus::skZero3f}};;
|
|
|
|
rstl::reserved_vector<float, 2> x818_ = {{0.f, 0.f}};
|
|
|
|
rstl::reserved_vector<bool, 2> x824_ = {{false, false}};
|
|
|
|
std::unique_ptr<CModelData> x82c_shieldModel;
|
2020-04-04 11:46:22 +00:00
|
|
|
u8 x830_13_ : 2;
|
|
|
|
u8 x830_10_ : 2;
|
|
|
|
bool x834_24_ : 1;
|
|
|
|
bool x834_25_ : 1;
|
|
|
|
bool x834_26_ : 1;
|
|
|
|
bool x834_27_ : 1;
|
|
|
|
bool x834_28_ : 1;
|
2020-04-05 07:31:34 +00:00
|
|
|
bool x834_29_codeTrigger : 1;
|
|
|
|
bool x834_30_visible : 1;
|
2020-04-04 11:46:22 +00:00
|
|
|
bool x834_31_ : 1;
|
|
|
|
bool x835_24_ : 1;
|
|
|
|
bool x835_25_ : 1;
|
|
|
|
bool x835_26_ : 1;
|
|
|
|
void UpdateTouchBounds(float radius);
|
2020-04-04 13:55:08 +00:00
|
|
|
bool HitShield(const zeus::CVector3f& dir) const;
|
|
|
|
void AddToTeam(CStateManager& mgr) const;
|
|
|
|
void RemoveFromTeam(CStateManager& mgr) const;
|
2020-04-05 07:31:34 +00:00
|
|
|
void UpdateLaser(CStateManager& mgr, u32 laserIdx, bool b1);
|
|
|
|
void FireProjectile(CStateManager& mgr, const zeus::CTransform& xf, const TToken<CWeaponDescription>& weapon);
|
|
|
|
void StrafeFromCompanions(CStateManager& mgr);
|
2020-04-04 13:55:08 +00:00
|
|
|
|
2020-03-31 13:38:18 +00:00
|
|
|
public:
|
|
|
|
DEFINE_PATTERNED(Drone);
|
|
|
|
CDrone(TUniqueId uid, std::string_view name, EFlavorType flavor, const CEntityInfo& info, const zeus::CTransform& xf,
|
|
|
|
float f1, CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms,
|
2020-04-04 11:46:22 +00:00
|
|
|
EMovementType movement, EColliderType colliderType, EBodyType bodyType, const CDamageInfo& dInfo1,
|
|
|
|
CAssetId aId1, const CDamageInfo& dInfo2, CAssetId aId2, std::vector<CVisorFlare::CFlareDef> flares, float f2,
|
|
|
|
float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12,
|
|
|
|
float f13, float f14, float f15, float f16, float f17, float f18, float f19, float f20, CAssetId crscId,
|
|
|
|
float f21, float f22, float f23, float f24, s32 w3, bool b1);
|
2020-03-31 13:38:18 +00:00
|
|
|
|
2020-04-04 13:55:08 +00:00
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void Think(float dt, CStateManager& mgr) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override;
|
|
|
|
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
2020-04-05 07:31:34 +00:00
|
|
|
void Render(const CStateManager& mgr) const override;
|
2020-04-04 13:55:08 +00:00
|
|
|
bool CanRenderUnsorted(const CStateManager& mgr) const override;
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability() const override { return CAi::GetDamageVulnerability(); }
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&,
|
|
|
|
const CDamageInfo&) const override;
|
|
|
|
void Touch(CActor& act, CStateManager& mgr) override;
|
|
|
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
|
|
|
const CWeaponMode&, EProjectileAttrib) const override;
|
|
|
|
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override;
|
|
|
|
const CCollisionPrimitive* GetCollisionPrimitive() const override;
|
|
|
|
void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override;
|
|
|
|
void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo& info, EKnockBackType type, bool inDeferred,
|
|
|
|
float magnitude) override;
|
|
|
|
void Patrol(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void PathFind(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void TargetPlayer(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void TargetCover(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void Deactivate(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void Attack(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void Active(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void Flee(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void ProjectileAttack(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void TelegraphAttack(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void Dodge(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void Retreat(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void Cover(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void SpecialAttack(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
void PathFindEx(CStateManager&, EStateMsg msg, float dt) override;
|
|
|
|
bool Leash(CStateManager&, float arg) override;
|
|
|
|
bool InRange(CStateManager&, float arg) override;
|
|
|
|
bool SpotPlayer(CStateManager&, float arg) override;
|
|
|
|
bool AnimOver(CStateManager&, float arg) override;
|
|
|
|
bool ShouldAttack(CStateManager&, float arg) override;
|
|
|
|
bool HearShot(CStateManager&, float arg) override;
|
|
|
|
bool CoverCheck(CStateManager&, float arg) override;
|
|
|
|
bool LineOfSight(CStateManager&, float arg) override;
|
|
|
|
bool ShouldMove(CStateManager&, float arg) override;
|
|
|
|
bool CodeTrigger(CStateManager&, float arg) override;
|
|
|
|
void Burn(float duration, float damage) override;
|
|
|
|
CPathFindSearch* GetSearchPath() override;
|
|
|
|
virtual void BuildNearList(EMaterialTypes includeMat, EMaterialTypes excludeMat,
|
|
|
|
rstl::reserved_vector<TUniqueId, 1024>& listOut, float radius, CStateManager& mgr);
|
|
|
|
virtual void SetLightEnabled(CStateManager& mgr, bool activate);
|
2020-04-05 07:31:34 +00:00
|
|
|
virtual void SetVisorFlareEnabled(CStateManager& mgr, bool activate);
|
2020-04-04 13:55:08 +00:00
|
|
|
virtual void UpdateVisorFlare(CStateManager& mgr);
|
|
|
|
virtual int sub_8015f150() { return 3; }
|
2020-03-31 13:38:18 +00:00
|
|
|
};
|
2020-04-05 07:31:34 +00:00
|
|
|
} // namespace MP1
|
|
|
|
} // namespace urde
|