diff options
author | aap <aap@papnet.eu> | 2020-05-19 20:56:42 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-19 20:56:42 +0200 |
commit | bdbe5d1080066073f063d653e80df6dbf4b326a2 (patch) | |
tree | bc4f8fd0f648bc38789591efe73d661ed2981998 /src/peds/Population.cpp | |
parent | Merge pull request #564 from Xinerki/miami (diff) | |
download | re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.gz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.bz2 re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.lz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.xz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.zst re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.zip |
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r-- | src/peds/Population.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 44bedab9..42abc2ab 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -853,18 +853,12 @@ CPopulation::ConvertToRealObject(CDummyObject *dummy) if (!obj) return; - bool makeInvisible; CWorld::Remove(dummy); delete dummy; CWorld::Add(obj); - int16 mi = obj->GetModelIndex(); - if (mi == MI_GLASS1 || mi == MI_GLASS2 || mi == MI_GLASS3 || mi == MI_GLASS4 || - mi == MI_GLASS5 || mi == MI_GLASS6 || mi == MI_GLASS7 || mi == MI_GLASS8) - makeInvisible = true; - else - makeInvisible = false; - if (makeInvisible) { + CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(obj->GetModelIndex()); + if (IsGlass(obj->GetModelIndex()) && !mi->m_isArtistGlass) { obj->bIsVisible = false; } else if (obj->GetModelIndex() == MI_BUOY) { obj->bIsStatic = false; @@ -883,17 +877,9 @@ CPopulation::ConvertToDummyObject(CObject *obj) dummy->GetMatrix().UpdateRW(); dummy->UpdateRwFrame(); - bool makeInvisible; - int16 mi = obj->GetModelIndex(); - if (mi == MI_GLASS1 || mi == MI_GLASS2 || mi == MI_GLASS3 || mi == MI_GLASS4 || - mi == MI_GLASS5 || mi == MI_GLASS6 || mi == MI_GLASS7 || mi == MI_GLASS8) - makeInvisible = true; - else - makeInvisible = false; - - if (makeInvisible) { + CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(obj->GetModelIndex()); + if (IsGlass(obj->GetModelIndex()) && !mi->m_isArtistGlass) dummy->bIsVisible = false; - } CWorld::Remove(obj); delete obj; |