@@ -104,7 +104,7 @@ CGameSA::CGameSA()
104104 m_pAESoundManager = new CAESoundManagerSA ((CAESoundManagerSAInterface*)CLASS_CAESoundManager);
105105 m_pAudioContainer = new CAudioContainerSA ();
106106 m_pWorld = new CWorldSA ();
107- m_Pools = std::make_unique< CPoolsSA> ();
107+ m_pPools = new CPoolsSA ();
108108 m_pClock = new CClockSA ();
109109 m_pRadar = new CRadarSA ();
110110 m_pCamera = new CCameraSA ((CCameraSAInterface*)CLASS_CCamera);
@@ -125,7 +125,7 @@ CGameSA::CGameSA()
125125 m_pControllerConfigManager = new CControllerConfigManagerSA ();
126126 m_pProjectileInfo = new CProjectileInfoSA ();
127127 m_pRenderWare = new CRenderWareSA ();
128- m_HandlingManager = std::make_unique< CHandlingManagerSA> ();
128+ m_pHandlingManager = new CHandlingManagerSA ();
129129 m_pEventList = new CEventListSA ();
130130 m_pGarages = new CGaragesSA ((CGaragesSAInterface*)CLASS_CGarages);
131131 m_pTasks = new CTasksSA ((CTaskManagementSystemSA*)m_pTaskManagementSystem);
@@ -208,17 +208,17 @@ CGameSA::CGameSA()
208208 m_Cheats[CHEAT_HEALTARMORMONEY] = new SCheatSA ((BYTE*)VAR_HealthArmorMoney, false );
209209
210210 // Change pool sizes here
211- m_Pools ->SetPoolCapacity (TASK_POOL, 5000 ); // Default is 500
212- m_Pools ->SetPoolCapacity (OBJECT_POOL, MAX_OBJECTS); // Default is 350
213- m_Pools ->SetPoolCapacity (EVENT_POOL, 5000 ); // Default is 200
214- m_Pools ->SetPoolCapacity (COL_MODEL_POOL, 12000 ); // Default is 10150
215- m_Pools ->SetPoolCapacity (ENV_MAP_MATERIAL_POOL, 16000 ); // Default is 4096
216- m_Pools ->SetPoolCapacity (ENV_MAP_ATOMIC_POOL, 4000 ); // Default is 1024
217- m_Pools ->SetPoolCapacity (SPEC_MAP_MATERIAL_POOL, 16000 ); // Default is 4096
218- m_Pools ->SetPoolCapacity (ENTRY_INFO_NODE_POOL, MAX_ENTRY_INFO_NODES); // Default is 500
219- m_Pools ->SetPoolCapacity (POINTER_SINGLE_LINK_POOL, MAX_POINTER_SINGLE_LINKS); // Default is 70000
220- m_Pools ->SetPoolCapacity (POINTER_DOUBLE_LINK_POOL, MAX_POINTER_DOUBLE_LINKS); // Default is 3200
221- dassert (m_Pools ->GetPoolCapacity (POINTER_SINGLE_LINK_POOL) == MAX_POINTER_SINGLE_LINKS);
211+ m_pPools ->SetPoolCapacity (TASK_POOL, 5000 ); // Default is 500
212+ m_pPools ->SetPoolCapacity (OBJECT_POOL, MAX_OBJECTS); // Default is 350
213+ m_pPools ->SetPoolCapacity (EVENT_POOL, 5000 ); // Default is 200
214+ m_pPools ->SetPoolCapacity (COL_MODEL_POOL, 12000 ); // Default is 10150
215+ m_pPools ->SetPoolCapacity (ENV_MAP_MATERIAL_POOL, 16000 ); // Default is 4096
216+ m_pPools ->SetPoolCapacity (ENV_MAP_ATOMIC_POOL, 4000 ); // Default is 1024
217+ m_pPools ->SetPoolCapacity (SPEC_MAP_MATERIAL_POOL, 16000 ); // Default is 4096
218+ m_pPools ->SetPoolCapacity (ENTRY_INFO_NODE_POOL, MAX_ENTRY_INFO_NODES); // Default is 500
219+ m_pPools ->SetPoolCapacity (POINTER_SINGLE_LINK_POOL, MAX_POINTER_SINGLE_LINKS); // Default is 70000
220+ m_pPools ->SetPoolCapacity (POINTER_DOUBLE_LINK_POOL, MAX_POINTER_DOUBLE_LINKS); // Default is 3200
221+ dassert (m_pPools ->GetPoolCapacity (POINTER_SINGLE_LINK_POOL) == MAX_POINTER_SINGLE_LINKS);
222222
223223 // Increase streaming object instances list size
224224 MemPut<WORD>(0x05B8E55 , MAX_RWOBJECT_INSTANCES * 12 ); // Default is 1000 * 12
@@ -261,6 +261,7 @@ CGameSA::~CGameSA()
261261 delete reinterpret_cast <CAnimManagerSA*>(m_pAnimManager);
262262 delete reinterpret_cast <CTasksSA*>(m_pTasks);
263263 delete reinterpret_cast <CTaskManagementSystemSA*>(m_pTaskManagementSystem);
264+ delete reinterpret_cast <CHandlingManagerSA*>(m_pHandlingManager);
264265 delete reinterpret_cast <CStatsSA*>(m_pStats);
265266 delete reinterpret_cast <CWeatherSA*>(m_pWeather);
266267 delete reinterpret_cast <CAERadioTrackManagerSA*>(m_pCAERadioTrackManager);
@@ -275,6 +276,7 @@ CGameSA::~CGameSA()
275276 delete reinterpret_cast <CCameraSA*>(m_pCamera);
276277 delete reinterpret_cast <CRadarSA*>(m_pRadar);
277278 delete reinterpret_cast <CClockSA*>(m_pClock);
279+ delete reinterpret_cast <CPoolsSA*>(m_pPools);
278280 delete reinterpret_cast <CWorldSA*>(m_pWorld);
279281 delete reinterpret_cast <CAudioEngineSA*>(m_pAudioEngine);
280282 delete reinterpret_cast <CAEAudioHardwareSA*>(m_pAEAudioHardware);
@@ -1037,8 +1039,8 @@ void CGameSA::RemoveAllBuildings()
10371039{
10381040 m_pIplStore->SetDynamicIplStreamingEnabled (false );
10391041
1040- m_Pools ->GetDummyPool ().RemoveAllBuildingLods ();
1041- m_Pools ->GetBuildingsPool ().RemoveAllBuildings ();
1042+ m_pPools ->GetDummyPool ().RemoveAllBuildingLods ();
1043+ m_pPools ->GetBuildingsPool ().RemoveAllBuildings ();
10421044
10431045 auto pBuildingRemoval = static_cast <CBuildingRemovalSA*>(m_pBuildingRemoval);
10441046 pBuildingRemoval->DropCaches ();
@@ -1048,8 +1050,8 @@ void CGameSA::RemoveAllBuildings()
10481050
10491051void CGameSA::RestoreGameBuildings ()
10501052{
1051- m_Pools ->GetBuildingsPool ().RestoreAllBuildings ();
1052- m_Pools ->GetDummyPool ().RestoreAllBuildingsLods ();
1053+ m_pPools ->GetBuildingsPool ().RestoreAllBuildings ();
1054+ m_pPools ->GetDummyPool ().RestoreAllBuildingsLods ();
10531055
10541056 m_pIplStore->SetDynamicIplStreamingEnabled (true , [](CIplSAInterface* ipl) { return memcmp (" barriers" , ipl->name , 8 ) != 0 ; });
10551057 m_isBuildingsRemoved = false ;
@@ -1067,7 +1069,7 @@ bool CGameSA::SetBuildingPoolSize(size_t size)
10671069 static_cast <CBuildingRemovalSA*>(m_pBuildingRemoval)->DropCaches ();
10681070 }
10691071
1070- bool status = m_Pools ->GetBuildingsPool ().Resize (size);
1072+ bool status = m_pPools ->GetBuildingsPool ().Resize (size);
10711073
10721074 if (shouldRemoveBuilding)
10731075 {
0 commit comments