summaryrefslogtreecommitdiffstats
path: root/src/core/Collision.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-07-09 18:18:42 +0200
committerSergeanur <s.anureev@yandex.ua>2020-07-09 18:18:42 +0200
commitcf69f22a0ce5b808a4d945a5cef1d9d4c51c0b5c (patch)
treef8a4337f1394c0c55b1be4e8ee62e49e713ba1c7 /src/core/Collision.cpp
parentRemove console and fix sth (diff)
downloadre3-cf69f22a0ce5b808a4d945a5cef1d9d4c51c0b5c.tar
re3-cf69f22a0ce5b808a4d945a5cef1d9d4c51c0b5c.tar.gz
re3-cf69f22a0ce5b808a4d945a5cef1d9d4c51c0b5c.tar.bz2
re3-cf69f22a0ce5b808a4d945a5cef1d9d4c51c0b5c.tar.lz
re3-cf69f22a0ce5b808a4d945a5cef1d9d4c51c0b5c.tar.xz
re3-cf69f22a0ce5b808a4d945a5cef1d9d4c51c0b5c.tar.zst
re3-cf69f22a0ce5b808a4d945a5cef1d9d4c51c0b5c.zip
Diffstat (limited to 'src/core/Collision.cpp')
-rw-r--r--src/core/Collision.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/core/Collision.cpp b/src/core/Collision.cpp
index 23eaa8dd..cb8b4189 100644
--- a/src/core/Collision.cpp
+++ b/src/core/Collision.cpp
@@ -180,12 +180,16 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
if(level == CGame::currLevel || forceChange){
CTimer::Stop();
+#ifndef NO_ISLAND_LOADING
DMAudio.SetEffectsFadeVol(0);
CPad::StopPadsShaking();
LoadCollisionScreen(CGame::currLevel);
DMAudio.Service();
+#endif
CPopulation::DealWithZoneChange(ms_collisionInMemory, CGame::currLevel, false);
+
+#ifndef NO_ISLAND_LOADING
CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL);
CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL);
CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN);
@@ -196,19 +200,27 @@ CCollision::LoadCollisionWhenINeedIt(bool forceChange)
CStreaming::RemoveUnusedModelsInLoadedList();
CGame::TidyUpMemory(true, true);
CFileLoader::LoadCollisionFromDatFile(CGame::currLevel);
+#endif
+
ms_collisionInMemory = CGame::currLevel;
CReplay::EmptyReplayBuffer();
+#ifndef NO_ISLAND_LOADING
if(CGame::currLevel != LEVEL_NONE)
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
CStreaming::RequestBigBuildings(CGame::currLevel);
+#endif
CStreaming::LoadAllRequestedModels(true);
+#ifndef NO_ISLAND_LOADING
CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel);
CGame::TidyUpMemory(true, true);
+#endif
CTimer::Update();
+#ifndef NO_ISLAND_LOADING
DMAudio.SetEffectsFadeVol(127);
+#endif
}
}
@@ -217,10 +229,23 @@ CCollision::SortOutCollisionAfterLoad(void)
{
if(ms_collisionInMemory == CGame::currLevel)
return;
-
+#ifndef NO_ISLAND_LOADING
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
- if(CGame::currLevel != LEVEL_NONE){
+#endif
+ if (CGame::currLevel != LEVEL_NONE) {
+#ifdef NO_ISLAND_LOADING
+ static bool bAlreadyLoaded = false;
+ if (bAlreadyLoaded) {
+ ms_collisionInMemory = CGame::currLevel;
+ return;
+ }
+ bAlreadyLoaded = true;
+ CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
+ CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
+ CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
+#else
CFileLoader::LoadCollisionFromDatFile(CGame::currLevel);
+#endif
if(!CGame::playingIntro)
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
}