summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-07-13 17:10:17 +0200
committerSergeanur <s.anureev@yandex.ua>2020-07-13 17:10:17 +0200
commitd0f5464200be032ee464218cfe415f3ce0b119a7 (patch)
treedd6f068286bb29c72192689bf741c43fcb505ae1 /src/control/Script.cpp
parentMerge pull request #654 from erorcun/miami (diff)
parentRename LEVEL_NONE to LEVEL_GENERIC (diff)
downloadre3-d0f5464200be032ee464218cfe415f3ce0b119a7.tar
re3-d0f5464200be032ee464218cfe415f3ce0b119a7.tar.gz
re3-d0f5464200be032ee464218cfe415f3ce0b119a7.tar.bz2
re3-d0f5464200be032ee464218cfe415f3ce0b119a7.tar.lz
re3-d0f5464200be032ee464218cfe415f3ce0b119a7.tar.xz
re3-d0f5464200be032ee464218cfe415f3ce0b119a7.tar.zst
re3-d0f5464200be032ee464218cfe415f3ce0b119a7.zip
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 9407cc06..afc4fecb 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -9143,7 +9143,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
CEntity* apEntities[16];
CWorld::FindObjectsOfTypeInRange(mi, pos, range, true, &total, 16, apEntities, true, false, false, true, true);
if (total == 0)
- CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(LEVEL_NONE), pos, range, true, &total, 16, apEntities);
+ CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, range, true, &total, 16, apEntities);
if (total == 0)
CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, range, true, &total, 16, apEntities);
CEntity* pClosestEntity = nil;
@@ -9933,7 +9933,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
CEntity* apEntities[16];
CWorld::FindObjectsOfTypeInRange(mi1, pos, radius, true, &total, 16, apEntities, true, false, false, false, false);
if (total == 0)
- CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_NONE), pos, radius, true, &total, 16, apEntities);
+ CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, radius, true, &total, 16, apEntities);
if (total == 0)
CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, radius, true, &total, 16, apEntities);
CEntity* pClosestEntity = nil;
@@ -10593,11 +10593,15 @@ 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);
+#endif
CCollision::SortOutCollisionAfterLoad();
+#ifndef NO_ISLAND_LOADING
CStreaming::RequestIslands(CGame::currLevel);
CStreaming::LoadAllRequestedModels(true);
+#endif
CTimer::Update();
return 0;
}
@@ -10626,7 +10630,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
if (ScriptParams[1])
pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition());
else
- pVehicle->m_nZoneLevel = LEVEL_NONE;
+ pVehicle->m_nZoneLevel = LEVEL_GENERIC;
return 0;
}
case COMMAND_SET_CHAR_STAYS_IN_CURRENT_LEVEL:
@@ -10637,7 +10641,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
if (ScriptParams[1])
pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition());
else
- pPed->m_nZoneLevel = LEVEL_NONE;
+ pPed->m_nZoneLevel = LEVEL_GENERIC;
return 0;
}
*/
@@ -11275,18 +11279,24 @@ 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();
+#endif
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
+#ifndef NO_ISLAND_LOADING
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+#endif
CCollision::SortOutCollisionAfterLoad();
+#ifndef NO_ISLAND_LOADING
CStreaming::RequestIslands(CGame::currLevel);
CStreaming::RequestBigBuildings(CGame::currLevel);
CStreaming::LoadAllRequestedModels(true);
DMAudio.SetEffectsFadeVol(127);
+#endif
}
CTimer::Update();
return 0;