summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-26 16:24:47 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-26 16:24:47 +0200
commit0ce2af7a0d233dea7ec38cde0b7434ab64dc6098 (patch)
tree57108b314e2d41b328fe1c2e3929c0101327af29 /src/control/Garages.cpp
parentupdated librw (diff)
parentupdated librw (diff)
downloadre3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar
re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.gz
re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.bz2
re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.lz
re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.xz
re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.zst
re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.zip
Diffstat (limited to 'src/control/Garages.cpp')
-rw-r--r--src/control/Garages.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 615ba77f..64ebddfe 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1781,7 +1781,14 @@ CVehicle* CStoredCar::RestoreCar()
CStreaming::RequestModel(m_nModelIndex, STREAMFLAGS_DEPENDENCY);
if (!CStreaming::HasModelLoaded(m_nModelIndex))
return nil;
- CVehicleModelInfo::SetComponentsToUse(m_nVariationA, m_nVariationB);
+#ifdef FIX_BUGS
+ CVehicleModelInfo* pModelInfo = (CVehicleModelInfo*)CModelInfo::GetModelInfo(m_nModelIndex);
+ assert(pModelInfo);
+ if (pModelInfo->m_numComps != 0)
+#endif
+ {
+ CVehicleModelInfo::SetComponentsToUse(m_nVariationA, m_nVariationB);
+ }
CVehicle* pVehicle;
if (CModelInfo::IsBoatModel(m_nModelIndex))
pVehicle = new CBoat(m_nModelIndex, RANDOM_VEHICLE);