mirror of
https://github.com/halpz/re3.git
synced 2025-06-30 00:16:22 +00:00
Merge branch 'master' into miami
# Conflicts: # gamefiles/TEXT/american.gxt # src/control/Garages.cpp # src/control/Record.cpp # src/control/Script.cpp # src/core/Collision.cpp # src/core/Frontend.cpp # src/core/Frontend.h # src/core/Game.cpp # src/core/MenuScreens.cpp # src/core/Streaming.cpp # src/core/config.h # src/core/re3.cpp # src/modelinfo/ModelInfo.cpp # src/render/Renderer.cpp # src/save/GenericGameStorage.cpp # utils/gxt/american.txt
This commit is contained in:
@ -950,6 +950,10 @@ CCarCtrl::RemoveCarsIfThePoolGetsFull(void)
|
||||
void
|
||||
CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
if (pVehicle->bIsLocked)
|
||||
return;
|
||||
#endif
|
||||
CVector vecPlayerPos = FindPlayerCentreOfWorld(CWorld::PlayerInFocus);
|
||||
/* BUG: this variable is initialized only in if-block below but can be used outside of it. */
|
||||
if (!IsThisVehicleInteresting(pVehicle) && !pVehicle->bIsLocked &&
|
||||
|
@ -1324,7 +1324,7 @@ void CGarage::RemoveCarsBlockingDoorNotInside()
|
||||
if (!IsEntityTouching3D(pVehicle))
|
||||
continue;
|
||||
if (!IsPointInsideGarage(pVehicle->GetPosition())) {
|
||||
if (pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
|
||||
if (!pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
|
||||
CWorld::Remove(pVehicle);
|
||||
delete pVehicle;
|
||||
return; // WHY?
|
||||
@ -1817,8 +1817,9 @@ CVehicle* CStoredCar::RestoreCar()
|
||||
pVehicle->m_nRadioStation = m_nRadioStation;
|
||||
pVehicle->bFreebies = false;
|
||||
#ifdef FIX_BUGS
|
||||
((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
|
||||
if (pVehicle->IsCar())
|
||||
#endif
|
||||
((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
|
||||
pVehicle->bHasBeenOwnedByPlayer = true;
|
||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
pVehicle->bBulletProof = m_bBulletproof;
|
||||
|
@ -10228,11 +10228,11 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
|
||||
return 0;
|
||||
CVehicle* car;
|
||||
if (CModelInfo::IsBikeModel(model)) {
|
||||
car = new CBike(model, MISSION_VEHICLE);
|
||||
car = new CBike(model, RANDOM_VEHICLE);
|
||||
((CBike*)(car))->bIsStanding = true;
|
||||
}
|
||||
else
|
||||
car = new CAutomobile(model, MISSION_VEHICLE);
|
||||
car = new CAutomobile(model, RANDOM_VEHICLE);
|
||||
CVector pos = *(CVector*)&ScriptParams[0];
|
||||
pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
car->SetPosition(pos);
|
||||
@ -10590,15 +10590,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;
|
||||
}
|
||||
@ -10924,7 +10930,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
|
||||
#ifdef USE_MEASUREMENTS_IN_METERS
|
||||
UpdateCompareFlag(true);
|
||||
#else
|
||||
UpdateCompareFlag(false)
|
||||
UpdateCompareFlag(false);
|
||||
#endif
|
||||
return 0;
|
||||
case COMMAND_CONVERT_METRES_TO_FEET:
|
||||
@ -11277,24 +11283,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;
|
||||
|
Reference in New Issue
Block a user