diff --git a/Runtime/MP1/World/CElitePirate.hpp b/Runtime/MP1/World/CElitePirate.hpp index 6abacb4cb..45f11e14a 100644 --- a/Runtime/MP1/World/CElitePirate.hpp +++ b/Runtime/MP1/World/CElitePirate.hpp @@ -77,6 +77,15 @@ public: }; class CElitePirate : public CPatterned { +protected: + enum class EState { + Invalid = -1, + Zero = 0, + One = 1, + Two = 2, + Over = 3, + }; + private: struct SUnknownStruct { private: @@ -90,14 +99,6 @@ private: void Clear() { x4_.clear(); } }; - enum class EState { - Invalid = -1, - Zero = 0, - One = 1, - Two = 2, - Over = 3, - }; - EState x568_state = EState::Invalid; CDamageVulnerability x56c_vulnerability; std::unique_ptr x5d4_collisionActorMgr; @@ -189,10 +190,10 @@ public: virtual void SetupHealthInfo(CStateManager& mgr); virtual void SetLaunchersActive(CStateManager& mgr, bool val); virtual SShockWaveData GetShockWaveData() const { - return {x5d8_data.GetXF8(), x5d8_data.GetXFC(), x5d8_data.GetX118(), x5d8_data.GetX11C()}; + return {x5d8_data.GetXF8(), x5d8_data.GetXFC(), 16.5217f, x5d8_data.GetX118(), x5d8_data.GetX11C()}; } -private: +protected: void SetupPathFindSearch(); void SetShotAt(bool val, CStateManager& mgr); bool IsArmClawCollider(TUniqueId uid, const rstl::reserved_vector& vec) const; @@ -226,5 +227,9 @@ private: bool ShouldCallForBackupFromLauncher(const CStateManager& mgr, TUniqueId uid) const; bool IsClosestEnergyAttractor(const CStateManager& mgr, const rstl::reserved_vector& charNearList, const zeus::CVector3f& projectilePos) const; + + const CElitePirateData& GetData() const { return x5d8_data; } + EState GetState() const { return x568_state; } + void SetState(EState state) { x568_state = state; } }; -} // namespace urde +} // namespace urde::MP1 diff --git a/Runtime/MP1/World/COmegaPirate.cpp b/Runtime/MP1/World/COmegaPirate.cpp index 16f462ec6..a310b673d 100644 --- a/Runtime/MP1/World/COmegaPirate.cpp +++ b/Runtime/MP1/World/COmegaPirate.cpp @@ -1,12 +1,370 @@ #include "Runtime/MP1/World/COmegaPirate.hpp" +#include "Runtime/Collision/CCollisionActor.hpp" +#include "Runtime/Collision/CCollisionActorManager.hpp" +#include "Runtime/CSimplePool.hpp" +#include "Runtime/GameGlobalObjects.hpp" +#include "Runtime/World/CPlayer.hpp" +#include "Runtime/World/CWorld.hpp" + +#include "TCastTo.hpp" // Generated file, do not modify include path + namespace urde::MP1 { -COmegaPirate::CFlash::CFlash(TUniqueId uid, const CEntityInfo& info, const zeus::CVector3f& pos, CToken& p4, float p5) +COmegaPirate::CFlash::CFlash(TUniqueId uid, const CEntityInfo& info, const zeus::CVector3f& pos, + TToken& thermalSpot, float p5) : CActor(uid, true, "Omega Pirate Flash", info, zeus::CTransform::Translate(pos), CModelData::CModelDataNull(), {}, - CActorParameters::None(), kInvalidUniqueId) {} + CActorParameters::None(), kInvalidUniqueId) +, xe8_thermalSpot(thermalSpot) +, xf4_(p5) {} + +void COmegaPirate::CFlash::Accept(IVisitor& visitor) { visitor.Visit(this); } COmegaPirate::COmegaPirate(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, CElitePirateData data, CAssetId w1, CAssetId w2, CAssetId w3) -: CElitePirate(uid, name, info, xf, std::move(mData), pInfo, actParms, data) {} +: CElitePirate(uid, name, info, xf, std::move(mData), pInfo, actParms, data) +, x9d0_(GetModelData()->GetScale()) +, x9f0_(*g_SimplePool, w1, w2, w3, 0, 0) +, xb70_thermalSpot(g_SimplePool->GetObj("Thermal_Spot_2"sv)) { + x9a4_.reserve(3); + x9b8_.reserve(24); + x9dc_.reserve(4); + xaa0_.reserve(4); + xab4_.reserve(3); + xb7c_.resize(4, 0); + + SetMass(100000.f); + + CMaterialFilter filter = GetMaterialFilter(); + filter.ExcludeList().Add( + CMaterialList{EMaterialTypes::Character, EMaterialTypes::CollisionActor, EMaterialTypes::Platform}); + SetMaterialFilter(filter); + + GetSearchPath()->SetPadding(20.f); +} + +void COmegaPirate::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) { + CElitePirate::AcceptScriptMsg(msg, uid, mgr); + // TODO +} + +bool COmegaPirate::AggressionCheck(CStateManager& mgr, float arg) { + return x990_launcherId2 == kInvalidUniqueId && CElitePirate::AggressionCheck(mgr, arg); +} + +void COmegaPirate::Attack(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + x402_28_isMakingBigStrike = true; + x504_damageDur = 1.f; + } else if (msg == EStateMsg::Deactivate) { + x402_28_isMakingBigStrike = false; + x504_damageDur = 0.f; + } + CElitePirate::Attack(mgr, msg, dt); +} + +bool COmegaPirate::CodeTrigger(CStateManager&, float) { return xb78_; } + +void COmegaPirate::Cover(CStateManager& mgr, EStateMsg msg, float dt) { + CElitePirate::Cover(mgr, msg, dt); + if (msg == EStateMsg::Activate) { + xad4_cachedSpeed = x3b4_speed; + xad8_cover = true; + } else if (msg == EStateMsg::Deactivate) { + xad8_cover = false; + } +} + +bool COmegaPirate::CoverBlown(CStateManager&, float) { + if (x9b4_) { + x9b4_ = false; + xb5c_ = 0.f; + return true; + } + return false; +} + +void COmegaPirate::Dizzy(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + xa44_ = true; + } else if (msg == EStateMsg::Update) { + GetBodyController()->GetCommandMgr().DeliverCmd(CBCLoopReactionCmd(pas::EReactionType::Two)); + } else if (msg == EStateMsg::Deactivate) { + GetBodyController()->GetCommandMgr().DeliverCmd(CBodyStateCmd(EBodyStateCmd::ExitState)); + } +} + +void COmegaPirate::DoubleSnap(CStateManager& mgr, EStateMsg msg, float dt) { + // TODO +} + +void COmegaPirate::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) { + switch (type) { + case EUserEventType::EggLay: + if (x990_launcherId2 != kInvalidUniqueId) { + if (auto entity = mgr.ObjectById(x990_launcherId2)) { + mgr.SendScriptMsg(entity, GetUniqueId(), EScriptObjectMessage::Action); + } + } + break; + case EUserEventType::FadeIn: + x9a1_ = true; + break; + case EUserEventType::FadeOut: + if (x994_ != 2 && x9a1_) { + x994_ = 1; + xa30_ = 3; + } + break; + case EUserEventType::ObjectPickUp: + // TODO + break; + case EUserEventType::Projectile: + case EUserEventType::DamageOn: + case EUserEventType::DamageOff: + case EUserEventType::ScreenShake: + case EUserEventType::BeginAction: + case EUserEventType::BecomeShootThrough: + default: + CElitePirate::DoUserAnimEvent(mgr, node, type, dt); + } +} + +void COmegaPirate::Enraged(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + SetState(EState::Zero); + } else if (msg == EStateMsg::Update) { + if (GetState() == CElitePirate::EState::Zero) { + if (GetBodyController()->GetCurrentStateId() == pas::EAnimationState::Taunt) { + SetState(CElitePirate::EState::Two); + } else { + GetBodyController()->GetCommandMgr().DeliverCmd(CBCTauntCmd(pas::ETauntType::Zero)); + } + } else if (GetState() == CElitePirate::EState::Two && + GetBodyController()->GetCurrentStateId() != pas::EAnimationState::Taunt) { + SetState(CElitePirate::EState::Over); + } + } else if (msg == EStateMsg::Deactivate) { + xadf_ = true; + xae0_ = true; + } +} + +void COmegaPirate::Explode(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + SetState(EState::Zero); + xad0_ = false; + } else if (msg == EStateMsg::Update) { + if (GetState() == CElitePirate::EState::Zero) { + if (GetBodyController()->GetCurrentStateId() == pas::EAnimationState::Step) { + SetState(CElitePirate::EState::Two); + } else { + GetBodyController()->GetCommandMgr().DeliverCmd( + CBCStepCmd(pas::EStepDirection::Forward, pas::EStepType::Dodge)); + } + } else if (GetState() == CElitePirate::EState::Two && + GetBodyController()->GetCurrentStateId() != pas::EAnimationState::Step) { + SetState(CElitePirate::EState::Over); + } + } else if (msg == EStateMsg::Deactivate) { + GetBodyController()->SetLocomotionType(xa40_); + } +} + +void COmegaPirate::Faint(CStateManager& mgr, EStateMsg msg, float dt) { + // TODO +} + +void COmegaPirate::Growth(CStateManager& mgr, EStateMsg msg, float dt) { + // TODO +} + +void COmegaPirate::JumpBack(CStateManager& mgr, EStateMsg msg, float dt) { + // TODO +} + +bool COmegaPirate::Landed(CStateManager& mgr, float arg) { return (xb4c_ & 0xe7) == 0; } + +zeus::CVector3f COmegaPirate::GetOrbitPosition(const CStateManager& mgr) const { + if (x990_launcherId2 != kInvalidUniqueId && + mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Thermal) { + if (const auto actor = static_cast(mgr.GetObjectById(x990_launcherId2))) { + return GetLockOnPosition(actor); + } + } + return CElitePirate::GetOrbitPosition(mgr); +} + +bool COmegaPirate::HearPlayer(CStateManager& mgr, float arg) { return xa3c_hearPlayer; } + +void COmegaPirate::PathFind(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + xad4_cachedSpeed = x3b4_speed; + x3b4_speed = 1.4f * xad4_cachedSpeed; + } else if (msg == EStateMsg::Update) { + if (GetBodyController()->GetCurrentStateId() == pas::EAnimationState::KnockBack) { + x3b4_speed = xad4_cachedSpeed; + } else if (xad4_cachedSpeed == x3b4_speed) { + x3b4_speed = 1.4f * xad4_cachedSpeed; + } + } else if (msg == EStateMsg::Deactivate) { + x3b4_speed = xad4_cachedSpeed; + } + CElitePirate::PathFind(mgr, msg, dt); +} + +void COmegaPirate::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { + CElitePirate::PreRender(mgr, frustum); + if (mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::XRay) { + xb4_drawFlags = CModelFlags{1, 0, 3, zeus::CColor{xa80_}}; + } +} + +void COmegaPirate::Render(const CStateManager& mgr) const { + CPatterned::Render(mgr); + // TODO +} + +void COmegaPirate::Retreat(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + SetShotAt(false, mgr); + SetState(CElitePirate::EState::Zero); + SendScriptMsgs(EScriptObjectState::Inside, mgr, EScriptObjectMessage::None); + xad0_ = false; + xa44_ = false; + xa4a_ = false; + xb5c_ = 0.f; + xb60_ = 0.f; + xb64_ = 5.f; + ++xb68_; + } else if (msg == EStateMsg::Update) { + if (GetState() == CElitePirate::EState::Zero) { + if (GetBodyController()->GetCurrentStateId() == pas::EAnimationState::Step) { + SetState(CElitePirate::EState::Two); + } else { + GetBodyController()->GetCommandMgr().DeliverCmd( + CBCStepCmd(pas::EStepDirection::Forward, pas::EStepType::BreakDodge)); + } + } else if (GetState() == CElitePirate::EState::Two && + GetBodyController()->GetCurrentStateId() != pas::EAnimationState::Step) { + SetState(CElitePirate::EState::Over); + } + } +} + +void COmegaPirate::Run(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + xad4_cachedSpeed = x3b4_speed; + x3b4_speed = 1.4f * xad4_cachedSpeed; + } else if (msg == EStateMsg::Update) { + if (GetBodyController()->GetCurrentStateId() == pas::EAnimationState::KnockBack) { + x3b4_speed = xad4_cachedSpeed; + } else if (xad4_cachedSpeed == x3b4_speed) { + x3b4_speed = 1.4f * xad4_cachedSpeed; + } + } else if (msg == EStateMsg::Deactivate) { + x3b4_speed = xad4_cachedSpeed; + } + CElitePirate::Run(mgr, msg, dt); +} + +bool COmegaPirate::ShotAt(CStateManager& mgr, float arg) { return CElitePirate::ShotAt(mgr, arg); } + +bool COmegaPirate::ShouldCallForBackup(CStateManager& mgr, float arg) { + if (CElitePirate::ShouldCallForBackup(mgr, arg)) { + return ShouldCallForBackupFromLauncher(mgr, x990_launcherId2); + } + return false; +} + +bool COmegaPirate::ShouldFire(CStateManager& mgr, float arg) { + if (CElitePirate::ShouldFire(mgr, arg)) { + return ShouldFireFromLauncher(mgr, x990_launcherId2); + } + return false; +} + +bool COmegaPirate::ShouldMove(CStateManager& mgr, float arg) { return xb64_ < x330_stateMachineState.GetTime(); } + +void COmegaPirate::Shuffle(CStateManager& mgr, EStateMsg msg, float dt) {} + +void COmegaPirate::Skid(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + SetState(EState::Zero); + } else if (msg == EStateMsg::Update) { + if (GetState() == CElitePirate::EState::Zero) { + if (GetBodyController()->GetCurrentStateId() == pas::EAnimationState::Step) { + SetState(CElitePirate::EState::Two); + } else { + GetBodyController()->GetCommandMgr().DeliverCmd( + CBCStepCmd(pas::EStepDirection::Forward, pas::EStepType::Normal)); + } + } else if (GetState() == CElitePirate::EState::Two && + GetBodyController()->GetCurrentStateId() != pas::EAnimationState::Step) { + SetState(CElitePirate::EState::Over); + } + } +} + +void COmegaPirate::Suck(CStateManager& mgr, EStateMsg msg, float dt) { + // TODO +} + +void COmegaPirate::TargetPatrol(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + xad4_cachedSpeed = x3b4_speed; + x3b4_speed = 1.4f * xad4_cachedSpeed; + } else if (msg == EStateMsg::Update) { + if (GetBodyController()->GetCurrentStateId() == pas::EAnimationState::KnockBack) { + x3b4_speed = xad4_cachedSpeed; + } else if (xad4_cachedSpeed == x3b4_speed) { + x3b4_speed = 1.4f * xad4_cachedSpeed; + } + } else if (msg == EStateMsg::Deactivate) { + x3b4_speed = xad4_cachedSpeed; + } + CElitePirate::TargetPatrol(mgr, msg, dt); +} + +void COmegaPirate::Think(float dt, CStateManager& mgr) { + CElitePirate::Think(dt, mgr); + // TODO +} + +void COmegaPirate::WallDetach(CStateManager& mgr, EStateMsg msg, float dt) { + if (msg == EStateMsg::Activate) { + SetState(CElitePirate::EState::Zero); + } else if (msg == EStateMsg::Update) { + if (GetState() == CElitePirate::EState::Zero) { + if (GetBodyController()->GetCurrentStateId() == pas::EAnimationState::Step) { + SetState(CElitePirate::EState::Two); + } else { + GetBodyController()->GetCommandMgr().DeliverCmd(CBCStepCmd(pas::EStepDirection::Left, pas::EStepType::Dodge)); + } + } else if (GetState() == CElitePirate::EState::Two && + GetBodyController()->GetCurrentStateId() != pas::EAnimationState::Step) { + SetState(CElitePirate::EState::Over); + } + } else if (msg == EStateMsg::Deactivate) { + mgr.SetBossParams(GetUniqueId(), xa98_maxEnergy, 89); + xb79_ = true; + } +} + +void COmegaPirate::WallHang(CStateManager& mgr, EStateMsg msg, float dt) {} + +void COmegaPirate::SetupHealthInfo(CStateManager& mgr) { + CElitePirate::SetupHealthInfo(mgr); + SetupLauncherHealthInfo(mgr, x990_launcherId2); +} + +void COmegaPirate::SetLaunchersActive(CStateManager& mgr, bool val) { + CElitePirate::SetLaunchersActive(mgr, val); + SetLauncherActive(mgr, val, x990_launcherId2); +} + +void COmegaPirate::CreateFlash(CStateManager& mgr, float arg) { + mgr.AddObject(new CFlash(mgr.AllocateUniqueId(), CEntityInfo{GetAreaIdAlways(), CEntity::NullConnectionList}, + GetRenderBounds().center(), xb70_thermalSpot, arg)); +} } // namespace urde::MP1 diff --git a/Runtime/MP1/World/COmegaPirate.hpp b/Runtime/MP1/World/COmegaPirate.hpp index 369393aa5..5b25ccafd 100644 --- a/Runtime/MP1/World/COmegaPirate.hpp +++ b/Runtime/MP1/World/COmegaPirate.hpp @@ -7,18 +7,134 @@ class COmegaPirate : public CElitePirate { private: class CFlash : public CActor { private: - CToken xe8_; - int xf0_; + TToken xe8_thermalSpot; + int xf0_ = 0; float xf4_; - float xf8_; - float xfc_; + float xf8_ = 0.f; + float xfc_ = 0.f; - CFlash(TUniqueId uid, const CEntityInfo& info, const zeus::CVector3f& pos, CToken& p4, float p5); + public: + CFlash(TUniqueId uid, const CEntityInfo& info, const zeus::CVector3f& pos, TToken& thermalSpot, float p5); + + void Accept(IVisitor& visitor) override; }; + TUniqueId x990_launcherId2 = kInvalidUniqueId; + int x994_ = 0; + float x998_ = 0.f; + float x99c_ = 1.f; + bool x9a0_ = true; + bool x9a1_ = true; + std::vector x9a4_; // TODO type + bool x9b4_ = false; + std::vector> x9b8_; + int x9c8_ = 0; + float x9cc_ = 0.f; + zeus::CVector3f x9d0_; + std::vector> x9dc_; + bool x9ec_ = false; + CSkinnedModel x9f0_; + float xa2c_ = 0.f; + int xa30_ = 0; + float xa34_ = 0.f; + std::unique_ptr xa38_; + bool xa3c_hearPlayer = false; + pas::ELocomotionType xa40_ = pas::ELocomotionType::Relaxed; + bool xa44_ = false; + TUniqueId xa46_ = kInvalidUniqueId; + TUniqueId xa48_ = kInvalidUniqueId; + bool xa4a_ = false; + zeus::CTransform xa4c_; + int xa7c_ = 0; + float xa80_ = 1.f; + float xa84_ = 0.f; + bool xa88_ = false; + float xa8c_ = 3.f; + float xa90_ = 1.f; + float xa94_ = 1.f; + float xa98_maxEnergy = 0.f; + std::unique_ptr xa9c_; + std::vector> xaa0_; + float xab0_ = 0.f; + std::vector xab4_; // TODO type + int xac4_ = 0; + int xac8_ = 0; + int xacc_ = 0; + bool xad0_ = false; + float xad4_cachedSpeed = 1.f; + bool xad8_cover = false; + TUniqueId xada_ = kInvalidUniqueId; + bool xadc_ = false; + bool xadd_ = false; + bool xade_ = false; + bool xadf_ = true; + bool xae0_ = true; + CDamageVulnerability xae4_ = CDamageVulnerability::NormalVulnerabilty(); + int xb4c_ = 0; + float xb50_ = 0.f; + zeus::CColor xb54_ = zeus::skWhite; + float xb58_ = 2.5f; + float xb5c_ = 0.f; + float xb60_ = 0.f; + float xb64_ = 17.f; + int xb68_ = 0; + bool xb6c_ = false; + bool xb6d_ = false; + bool xb6e_ = false; + TLockedToken xb70_thermalSpot; // was TToken + bool xb78_ = false; + bool xb79_ = false; + std::vector xb7c_; + float xb8c_ = 0.f; // not initialized in ctr + public: COmegaPirate(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, CElitePirateData data, CAssetId w1, CAssetId w2, CAssetId w3); + + void Think(float dt, CStateManager& mgr) override; + void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; + void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override; + void Render(const CStateManager& mgr) const override; + zeus::CVector3f GetOrbitPosition(const CStateManager& mgr) const override; + void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override; + void PathFind(CStateManager& mgr, EStateMsg msg, float dt) override; + void TargetPatrol(CStateManager& mgr, EStateMsg msg, float dt) override; + void Run(CStateManager& mgr, EStateMsg msg, float dt) override; + void Attack(CStateManager& mgr, EStateMsg msg, float dt) override; + void JumpBack(CStateManager& mgr, EStateMsg msg, float dt) override; + void DoubleSnap(CStateManager& mgr, EStateMsg msg, float dt) override; + void Shuffle(CStateManager& mgr, EStateMsg msg, float dt) override; + void Skid(CStateManager& mgr, EStateMsg msg, float dt) override; + void Suck(CStateManager& mgr, EStateMsg msg, float dt) override; + void Explode(CStateManager& mgr, EStateMsg msg, float dt) override; + void Retreat(CStateManager& mgr, EStateMsg msg, float dt) override; + void Cover(CStateManager& mgr, EStateMsg msg, float dt) override; + void WallHang(CStateManager& mgr, EStateMsg msg, float dt) override; + void WallDetach(CStateManager& mgr, EStateMsg msg, float dt) override; + void Enraged(CStateManager& mgr, EStateMsg msg, float dt) override; + void Growth(CStateManager& mgr, EStateMsg msg, float dt) override; + void Faint(CStateManager& mgr, EStateMsg msg, float dt) override; + void Dizzy(CStateManager& mgr, EStateMsg msg, float dt) override; + + bool Landed(CStateManager& mgr, float arg) override; + bool HearPlayer(CStateManager& mgr, float arg) override; + bool CoverBlown(CStateManager& mgr, float arg) override; + bool AggressionCheck(CStateManager& mgr, float arg) override; + bool ShouldFire(CStateManager& mgr, float arg) override; + bool ShouldMove(CStateManager& mgr, float arg) override; + bool ShotAt(CStateManager& mgr, float arg) override; + bool CodeTrigger(CStateManager& mgr, float arg) override; + bool ShouldCallForBackup(CStateManager& mgr, float arg) override; + bool HasWeakPointHead() const override { return false; } + bool IsElitePirate() const override { return false; } + void SetupHealthInfo(CStateManager& mgr) override; + void SetLaunchersActive(CStateManager& mgr, bool val) override; + SShockWaveData GetShockWaveData() const override { + return {GetData().GetXF8(), GetData().GetXFC(), 24.78255f, GetData().GetX118(), GetData().GetX11C()}; + } + +private: + void CreateFlash(CStateManager& mgr, float arg); }; } // namespace urde::MP1 diff --git a/Runtime/MP1/World/CShockWave.hpp b/Runtime/MP1/World/CShockWave.hpp index 6947cbf73..3d8d9f9c3 100644 --- a/Runtime/MP1/World/CShockWave.hpp +++ b/Runtime/MP1/World/CShockWave.hpp @@ -12,14 +12,14 @@ private: CDamageInfo x8_damageInfo; float x24_ = 0.f; float x28_ = 0.5f; - float x2c_ = 16.5217f; + float x2c_; float x30_ = 0.f; CAssetId x34_weaponDesc; u16 x38_electrocuteSfx; public: - SShockWaveData(CAssetId part, const CDamageInfo& dInfo, CAssetId weapon, u16 sfx) - : x4_particleDesc(part), x8_damageInfo(dInfo), x34_weaponDesc(weapon), x38_electrocuteSfx(sfx) {} + SShockWaveData(CAssetId part, const CDamageInfo& dInfo, float x2c, CAssetId weapon, u16 sfx) + : x4_particleDesc(part), x8_damageInfo(dInfo), x2c_(x2c), x34_weaponDesc(weapon), x38_electrocuteSfx(sfx) {} [[nodiscard]] CAssetId GetParticleDescId() const { return x4_particleDesc; } [[nodiscard]] const CDamageInfo& GetDamageInfo() const { return x8_damageInfo; } diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index 1f2ad0087..b754dfbbd 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -3645,7 +3645,6 @@ CEntity* ScriptLoader::LoadOmegaPirate(CStateManager& mgr, CInputStream& in, int return nullptr; } -#if 0 SScaledActorHead actHead = LoadScaledActorHead(in, mgr); auto pair = CPatternedInfo::HasCorrectParameterCount(in); if (!pair.first) { @@ -3665,9 +3664,6 @@ CEntity* ScriptLoader::LoadOmegaPirate(CStateManager& mgr, CInputStream& in, int return new MP1::COmegaPirate(mgr.AllocateUniqueId(), actHead.x0_name, info, actHead.x10_transform, std::move(mData), pInfo, actParms, elitePirateData, CAssetId(in), CAssetId(in), CAssetId(in)); -#else - return nullptr; -#endif } CEntity* ScriptLoader::LoadPhazonPool(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) {