diff --git a/Runtime/MP1/World/CSpacePirate.cpp b/Runtime/MP1/World/CSpacePirate.cpp index 6087de7c3..96720191b 100644 --- a/Runtime/MP1/World/CSpacePirate.cpp +++ b/Runtime/MP1/World/CSpacePirate.cpp @@ -20,6 +20,100 @@ #include "TCastTo.hpp" // Generated file, do not modify include path namespace urde::MP1 { +namespace { +constexpr std::string_view skParts[] = { + "Collar"sv, "Neck_1"sv, "R_shoulder"sv, "R_elbow"sv, "R_wrist"sv, "L_shoulder"sv, "L_elbow"sv, + "L_wrist"sv, "R_hip"sv, "R_knee"sv, "R_ankle"sv, "L_hip"sv, "L_knee"sv, "L_ankle"sv, +}; + +constexpr float skRadii[] = { + 0.45f, 0.52f, 0.35f, 0.1f, 0.15f, 0.35f, 0.1f, 0.15f, 0.15f, 0.15f, 0.15f, 0.15f, 0.15f, 0.15f, +}; + +constexpr SBurst skBurstsQuick[] = { + {20, {3, 4, 5, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {20, {2, 3, 4, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, + {20, {6, 5, 4, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {20, {1, 2, 3, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, + {20, {7, 6, 5, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsStandard[] = { + {15, {5, 3, 2, 1, -1, 0, 0, 0}, 0.100000, 0.050000}, {20, {1, 2, 3, 4, -1, 0, 0, 0}, 0.100000, 0.050000}, + {20, {7, 6, 5, 4, -1, 0, 0, 0}, 0.100000, 0.050000}, {15, {3, 4, 5, 6, -1, 0, 0, 0}, 0.100000, 0.050000}, + {15, {6, 5, 4, 3, -1, 0, 0, 0}, 0.100000, 0.050000}, {15, {2, 3, 4, 5, -1, 0, 0, 0}, 0.100000, 0.050000}, + {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsFrenzied[] = { + {40, {1, 2, 3, 4, 5, 6, -1, 0}, 0.100000, 0.050000}, {40, {7, 6, 5, 4, 3, 2, -1, 0}, 0.100000, 0.050000}, + {10, {2, 3, 4, 5, 4, 3, -1, 0}, 0.100000, 0.050000}, {10, {6, 5, 4, 3, 4, 5, -1, 0}, 0.100000, 0.050000}, + {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsJumping[] = { + {20, {16, 4, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {40, {5, 7, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {40, {1, 10, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsInjured[] = { + {15, {16, 1, 3, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {20, {3, 4, 6, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, + {25, {7, 5, 4, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {25, {2, 6, 4, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, + {15, {7, 5, 3, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsSeated[] = { + {35, {7, 13, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {35, {9, 1, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {30, {16, 12, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsQuickOOV[] = { + {10, {16, 15, 13, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {20, {13, 12, 10, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, + {30, {9, 11, 12, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {30, {14, 10, 12, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, + {10, {9, 11, 13, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsStandardOOV[] = { + {26, {16, 8, 11, 14, -1, 0, 0, 0}, 0.100000, 0.050000}, {26, {16, 13, 11, 12, -1, 0, 0, 0}, 0.100000, 0.050000}, + {16, {9, 11, 13, 10, -1, 0, 0, 0}, 0.100000, 0.050000}, {16, {14, 13, 12, 11, -1, 0, 0, 0}, 0.100000, 0.050000}, + {8, {10, 11, 12, 13, -1, 0, 0, 0}, 0.100000, 0.050000}, {8, {6, 8, 11, 13, -1, 0, 0, 0}, 0.100000, 0.050000}, + {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsFrenziedOOV[] = { + {40, {1, 16, 14, 12, 10, 11, -1, 0}, 0.100000, 0.050000}, {40, {9, 11, 12, 13, 11, 7, -1, 0}, 0.100000, 0.050000}, + {10, {8, 10, 11, 12, 13, 12, -1, 0}, 0.100000, 0.050000}, {10, {15, 13, 12, 10, 12, 9, -1, 0}, 0.100000, 0.050000}, + {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsJumpingOOV[] = { + {40, {7, 13, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {40, {9, 1, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {20, {16, 12, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsInjuredOOV[] = { + {30, {9, 11, 13, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {10, {13, 12, 10, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, + {15, {9, 11, 12, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {15, {14, 10, 12, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, + {30, {16, 15, 13, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; +constexpr SBurst skBurstsSeatedOOV[] = { + {35, {7, 13, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {35, {9, 1, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {30, {16, 12, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, + {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, +}; + +constexpr const SBurst* skBursts[] = { + skBurstsQuick, + skBurstsStandard, + skBurstsFrenzied, + skBurstsJumping, + skBurstsInjured, + skBurstsSeated, + skBurstsQuickOOV, + skBurstsStandardOOV, + skBurstsFrenziedOOV, + skBurstsJumpingOOV, + skBurstsInjuredOOV, + skBurstsSeatedOOV, + nullptr, +}; +} // Anonymous namespace + CSpacePirate::CSpacePirateData::CSpacePirateData(urde::CInputStream& in, u32 propCount) : x0_AggressionCheck(in.readFloatBig()) , x4_CoverCheck(in.readFloatBig()) @@ -50,13 +144,6 @@ CSpacePirate::CSpacePirateData::CSpacePirateData(urde::CInputStream& in, u32 pro , xc4_(propCount > 35 ? in.readFloatBig() : 0.2f) , xc8_AvoidDistance(propCount > 36 ? in.readFloatBig() : 8.f) {} -static const std::string_view skParts[] = {"Collar"sv, "Neck_1"sv, "R_shoulder"sv, "R_elbow"sv, "R_wrist"sv, - "L_shoulder"sv, "L_elbow"sv, "L_wrist"sv, "R_hip"sv, "R_knee"sv, - "R_ankle"sv, "L_hip"sv, "L_knee"sv, "L_ankle"sv}; - -static const float skRadii[] = {0.45f, 0.52f, 0.35f, 0.1f, 0.15f, 0.35f, 0.1f, - 0.15f, 0.15f, 0.15f, 0.15f, 0.15f, 0.15f, 0.15f}; - CPirateRagDoll::CPirateRagDoll(CStateManager& mgr, CSpacePirate* sp, u16 thudSfx, u32 flags) : CRagDoll(-sp->GetGravityConstant(), -3.f, 8.f, flags), x6c_spacePirate(sp), x70_thudSfx(thudSfx) { xb0_24_initSfx = true; @@ -252,87 +339,6 @@ void CPirateRagDoll::Prime(CStateManager& mgr, const zeus::CTransform& xf, CMode CRagDoll::Prime(mgr, xf, mData); } -const SBurst CSpacePirate::skBurstsQuick[] = { - {20, {3, 4, 5, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {20, {2, 3, 4, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, - {20, {6, 5, 4, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {20, {1, 2, 3, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, - {20, {7, 6, 5, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsStandard[] = { - {15, {5, 3, 2, 1, -1, 0, 0, 0}, 0.100000, 0.050000}, {20, {1, 2, 3, 4, -1, 0, 0, 0}, 0.100000, 0.050000}, - {20, {7, 6, 5, 4, -1, 0, 0, 0}, 0.100000, 0.050000}, {15, {3, 4, 5, 6, -1, 0, 0, 0}, 0.100000, 0.050000}, - {15, {6, 5, 4, 3, -1, 0, 0, 0}, 0.100000, 0.050000}, {15, {2, 3, 4, 5, -1, 0, 0, 0}, 0.100000, 0.050000}, - {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsFrenzied[] = { - {40, {1, 2, 3, 4, 5, 6, -1, 0}, 0.100000, 0.050000}, {40, {7, 6, 5, 4, 3, 2, -1, 0}, 0.100000, 0.050000}, - {10, {2, 3, 4, 5, 4, 3, -1, 0}, 0.100000, 0.050000}, {10, {6, 5, 4, 3, 4, 5, -1, 0}, 0.100000, 0.050000}, - {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsJumping[] = { - {20, {16, 4, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {40, {5, 7, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {40, {1, 10, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsInjured[] = { - {15, {16, 1, 3, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {20, {3, 4, 6, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, - {25, {7, 5, 4, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {25, {2, 6, 4, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, - {15, {7, 5, 3, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsSeated[] = { - {35, {7, 13, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {35, {9, 1, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {30, {16, 12, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsQuickOOV[] = { - {10, {16, 15, 13, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {20, {13, 12, 10, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, - {30, {9, 11, 12, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {30, {14, 10, 12, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, - {10, {9, 11, 13, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsStandardOOV[] = { - {26, {16, 8, 11, 14, -1, 0, 0, 0}, 0.100000, 0.050000}, {26, {16, 13, 11, 12, -1, 0, 0, 0}, 0.100000, 0.050000}, - {16, {9, 11, 13, 10, -1, 0, 0, 0}, 0.100000, 0.050000}, {16, {14, 13, 12, 11, -1, 0, 0, 0}, 0.100000, 0.050000}, - {8, {10, 11, 12, 13, -1, 0, 0, 0}, 0.100000, 0.050000}, {8, {6, 8, 11, 13, -1, 0, 0, 0}, 0.100000, 0.050000}, - {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsFrenziedOOV[] = { - {40, {1, 16, 14, 12, 10, 11, -1, 0}, 0.100000, 0.050000}, {40, {9, 11, 12, 13, 11, 7, -1, 0}, 0.100000, 0.050000}, - {10, {8, 10, 11, 12, 13, 12, -1, 0}, 0.100000, 0.050000}, {10, {15, 13, 12, 10, 12, 9, -1, 0}, 0.100000, 0.050000}, - {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsJumpingOOV[] = { - {40, {7, 13, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {40, {9, 1, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {20, {16, 12, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsInjuredOOV[] = { - {30, {9, 11, 13, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {10, {13, 12, 10, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, - {15, {9, 11, 12, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {15, {14, 10, 12, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, - {30, {16, 15, 13, -1, 0, 0, 0, 0}, 0.100000, 0.050000}, {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; -const SBurst CSpacePirate::skBurstsSeatedOOV[] = { - {35, {7, 13, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {35, {9, 1, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {30, {16, 12, -1, 0, 0, 0, 0, 0}, 0.100000, 0.050000}, - {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0.000000, 0.000000}, -}; - -const SBurst* CSpacePirate::skBursts[] = {skBurstsQuick, - skBurstsStandard, - skBurstsFrenzied, - skBurstsJumping, - skBurstsInjured, - skBurstsSeated, - skBurstsQuickOOV, - skBurstsStandardOOV, - skBurstsFrenziedOOV, - skBurstsJumpingOOV, - skBurstsInjuredOOV, - skBurstsSeatedOOV, - nullptr}; - std::list CSpacePirate::mChargePlayerList; CSpacePirate::CSpacePirate(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, diff --git a/Runtime/MP1/World/CSpacePirate.hpp b/Runtime/MP1/World/CSpacePirate.hpp index f351c553f..e057ef107 100644 --- a/Runtime/MP1/World/CSpacePirate.hpp +++ b/Runtime/MP1/World/CSpacePirate.hpp @@ -210,20 +210,6 @@ private: float x8d8_holdPositionTime = 0.f; float x8dc_leashTimer = 0.f; - static const SBurst skBurstsSeatedOOV[]; - static const SBurst skBurstsInjuredOOV[]; - static const SBurst skBurstsJumpingOOV[]; - static const SBurst skBurstsFrenziedOOV[]; - static const SBurst skBurstsStandardOOV[]; - static const SBurst skBurstsQuickOOV[]; - static const SBurst skBurstsSeated[]; - static const SBurst skBurstsInjured[]; - static const SBurst skBurstsJumping[]; - static const SBurst skBurstsFrenzied[]; - static const SBurst skBurstsStandard[]; - static const SBurst skBurstsQuick[]; - static const SBurst* skBursts[]; - static std::list mChargePlayerList; void UpdateCloak(float dt, CStateManager& mgr);