summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-20 19:40:36 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-20 19:40:36 +0200
commitf33a01e8c8db821b5c6457715f98aa8762d00167 (patch)
tree9a41c75660aac8e6dd6be8fa24e4b61fb05e0e23 /src/peds
parentscript revision (diff)
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.gz
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.bz2
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.lz
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.xz
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.zst
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Population.cpp22
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;