summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-25 23:45:32 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-25 23:45:32 +0200
commit5ca0d6c6cf8f567299d7698108c9f0e4cc97937f (patch)
treef977e6aea73450b5463f17d391bcb5b01ab83401 /src
parentfixed FIX_BUGS (diff)
downloadre3-5ca0d6c6cf8f567299d7698108c9f0e4cc97937f.tar
re3-5ca0d6c6cf8f567299d7698108c9f0e4cc97937f.tar.gz
re3-5ca0d6c6cf8f567299d7698108c9f0e4cc97937f.tar.bz2
re3-5ca0d6c6cf8f567299d7698108c9f0e4cc97937f.tar.lz
re3-5ca0d6c6cf8f567299d7698108c9f0e4cc97937f.tar.xz
re3-5ca0d6c6cf8f567299d7698108c9f0e4cc97937f.tar.zst
re3-5ca0d6c6cf8f567299d7698108c9f0e4cc97937f.zip
Diffstat (limited to 'src')
-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 5fc44974..e37df8d4 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1853,7 +1853,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);
+ }
#ifdef FIX_BUGS
CVehicle* pVehicle;
if (CModelInfo::IsBoatModel(m_nModelIndex))