From 8d2d5ef5d5a2d18a6c367c374a5c6c82692327e7 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 31 May 2020 22:05:48 -0400 Subject: [PATCH] COmegaPirate: MSVC runtime fix for skeleton asset IDs --- Runtime/MP1/World/COmegaPirate.cpp | 5 +++-- Runtime/MP1/World/COmegaPirate.hpp | 2 +- Runtime/World/ScriptLoader.cpp | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Runtime/MP1/World/COmegaPirate.cpp b/Runtime/MP1/World/COmegaPirate.cpp index 2aec16342..110d23da2 100644 --- a/Runtime/MP1/World/COmegaPirate.cpp +++ b/Runtime/MP1/World/COmegaPirate.cpp @@ -120,10 +120,11 @@ void COmegaPirate::CFlash::Render(CStateManager& mgr) { 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) + CElitePirateData data, CAssetId skeletonModelId, CAssetId skeletonSkinRulesId, + CAssetId skeletonLayoutInfoId) : CElitePirate(uid, name, info, xf, std::move(mData), pInfo, actParms, data) , x9d0_initialScale(GetModelData()->GetScale()) -, x9f0_skeletonModel(*g_SimplePool, w1, w2, w3, 0, 0) +, x9f0_skeletonModel(*g_SimplePool, skeletonModelId, skeletonSkinRulesId, skeletonLayoutInfoId, 0, 0) , xb70_thermalSpot(g_SimplePool->GetObj("Thermal_Spot_2"sv)) { x9a4_scriptWaypointPlatforms.reserve(3); x9b8_scriptEffects.reserve(24); diff --git a/Runtime/MP1/World/COmegaPirate.hpp b/Runtime/MP1/World/COmegaPirate.hpp index 21bb56280..eec2ec6cc 100644 --- a/Runtime/MP1/World/COmegaPirate.hpp +++ b/Runtime/MP1/World/COmegaPirate.hpp @@ -122,7 +122,7 @@ private: 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); + CAssetId skeletonModelId, CAssetId skeletonSkinRulesId, CAssetId skeletonLayoutInfoId); void Think(float dt, CStateManager& mgr) override; void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override; diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index 6da251123..0aed06b85 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -3659,11 +3659,14 @@ CEntity* ScriptLoader::LoadOmegaPirate(CStateManager& mgr, CInputStream& in, int return nullptr; } + const CAssetId skeletonModelId{in}; + const CAssetId skeletonSkinRulesId{in}; + const CAssetId skeletonLayoutInfoId{in}; CModelData mData(CAnimRes(pInfo.GetAnimationParameters().GetACSFile(), pInfo.GetAnimationParameters().GetCharacter(), actHead.x40_scale, pInfo.GetAnimationParameters().GetInitialAnimation(), true)); - 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)); + pInfo, actParms, elitePirateData, skeletonModelId, skeletonSkinRulesId, + skeletonLayoutInfoId); } CEntity* ScriptLoader::LoadPhazonPool(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) {