diff options
author | aap <aap@papnet.eu> | 2020-05-20 12:41:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 12:41:12 +0200 |
commit | fd4cd3e8f1599a62f70f4f2aa0931f7a82cf0f1b (patch) | |
tree | b32e29a80a2bb4c4692ed6dccef9b8c5e7f81185 /src/peds/Population.cpp | |
parent | 98b158c783e7e010b19aee22e452f1233a8f1ec2 (diff) | |
parent | bdbe5d1080066073f063d653e80df6dbf4b326a2 (diff) |
Merge pull request #569 from aap/miami
CEntity and friends
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 338c47f0..40ceb6c3 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -852,18 +852,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; @@ -882,17 +876,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; |