summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-08-16 16:26:44 +0200
committerSergeanur <s.anureev@yandex.ua>2020-08-16 16:26:44 +0200
commit732681db08438f0d61ad7fe4d670f79feaac7b9e (patch)
treef891869168bcc041408ac4ce00302fc4c1b5346b /src/control/Script.cpp
parentGraphics menu + MSAA (diff)
downloadre3-732681db08438f0d61ad7fe4d670f79feaac7b9e.tar
re3-732681db08438f0d61ad7fe4d670f79feaac7b9e.tar.gz
re3-732681db08438f0d61ad7fe4d670f79feaac7b9e.tar.bz2
re3-732681db08438f0d61ad7fe4d670f79feaac7b9e.tar.lz
re3-732681db08438f0d61ad7fe4d670f79feaac7b9e.tar.xz
re3-732681db08438f0d61ad7fe4d670f79feaac7b9e.tar.zst
re3-732681db08438f0d61ad7fe4d670f79feaac7b9e.zip
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp60
1 files changed, 41 insertions, 19 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 6eb802b4..fa0fb463 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -10017,15 +10017,21 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
CollectParameters(&m_nIp, 1);
CTimer::Stop();
CGame::currLevel = (eLevelName)ScriptParams[0];
-#ifndef NO_ISLAND_LOADING
- CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
- CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ {
+ CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
+ CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+ }
CCollision::SortOutCollisionAfterLoad();
-#ifndef NO_ISLAND_LOADING
- CStreaming::RequestIslands(CGame::currLevel);
- CStreaming::LoadAllRequestedModels(true);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
#endif
+ {
+ CStreaming::RequestIslands(CGame::currLevel);
+ CStreaming::LoadAllRequestedModels(true);
+ }
CTimer::Update();
return 0;
}
@@ -10641,24 +10647,40 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
CTimer::Stop();
CGame::currLevel = (eLevelName)ScriptParams[0];
if (CGame::currLevel != CCollision::ms_collisionInMemory) {
-#ifndef NO_ISLAND_LOADING
- DMAudio.SetEffectsFadeVol(0);
- CPad::StopPadsShaking();
- CCollision::LoadCollisionScreen(CGame::currLevel);
- DMAudio.Service();
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ {
+ DMAudio.SetEffectsFadeVol(0);
+ CPad::StopPadsShaking();
+ CCollision::LoadCollisionScreen(CGame::currLevel);
+ DMAudio.Service();
+ }
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
-#ifndef NO_ISLAND_LOADING
- CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
- CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ {
+ CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
+ CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+ }
CCollision::SortOutCollisionAfterLoad();
-#ifndef NO_ISLAND_LOADING
- CStreaming::RequestIslands(CGame::currLevel);
- CStreaming::RequestBigBuildings(CGame::currLevel);
- CStreaming::LoadAllRequestedModels(true);
- DMAudio.SetEffectsFadeVol(127);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
+#endif
+ CStreaming::RequestIslands(CGame::currLevel);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
+#endif
+ CStreaming::RequestBigBuildings(CGame::currLevel);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
+#endif
+ CStreaming::LoadAllRequestedModels(true);
+#ifdef NO_ISLAND_LOADING
+ if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
#endif
+ DMAudio.SetEffectsFadeVol(127);
}
CTimer::Update();
return 0;