From 37f33a91df320ef92f725d985943c15786a5c82b Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Mon, 9 Mar 2026 13:53:37 -0700 Subject: [PATCH] Replace SetMaxAllowedExtras setter with friend class --- LEGO1/lego/legoomni/include/legoanimationmanager.h | 8 ++++++-- extensions/src/multiplayer/networkmanager.cpp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index d6fcd256..d2795512 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -20,6 +20,10 @@ class LegoROIList; struct LegoOrientedEdge; class LegoWorld; class MxDSAction; +namespace Multiplayer +{ +class NetworkManager; +} // SIZE 0x30 struct ModelInfo { @@ -199,12 +203,12 @@ class LegoAnimationManager : public MxCore { LEGO1_EXPORT static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig); - void SetMaxAllowedExtras(MxU32 p_maxAllowedExtras) { m_maxAllowedExtras = p_maxAllowedExtras; } - // SYNTHETIC: LEGO1 0x1005ed10 // LegoAnimationManager::`scalar deleting destructor' private: + friend class Multiplayer::NetworkManager; + void Init(); MxResult FUN_100605e0( MxU32 p_index, diff --git a/extensions/src/multiplayer/networkmanager.cpp b/extensions/src/multiplayer/networkmanager.cpp index 4789e129..2806ea34 100644 --- a/extensions/src/multiplayer/networkmanager.cpp +++ b/extensions/src/multiplayer/networkmanager.cpp @@ -366,7 +366,7 @@ void NetworkManager::ProcessIncomingPackets() if (maxActors >= 5 && maxActors <= 40) { LegoAnimationManager::configureLegoAnimationManager(maxActors); if (AnimationManager()) { - AnimationManager()->SetMaxAllowedExtras(maxActors); + AnimationManager()->m_maxAllowedExtras = maxActors; } } }