summaryrefslogtreecommitdiffstats
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-22 16:41:03 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-22 16:41:03 +0200
commitab161d12d8cf0326bf072777b7eeef31e8cd516c (patch)
treed9fb154d49338cab92e278fc34952386daa9e314 /src/peds/Population.cpp
parentopus support (diff)
parentfixes for CPhysical and friends (diff)
downloadre3-ab161d12d8cf0326bf072777b7eeef31e8cd516c.tar
re3-ab161d12d8cf0326bf072777b7eeef31e8cd516c.tar.gz
re3-ab161d12d8cf0326bf072777b7eeef31e8cd516c.tar.bz2
re3-ab161d12d8cf0326bf072777b7eeef31e8cd516c.tar.lz
re3-ab161d12d8cf0326bf072777b7eeef31e8cd516c.tar.xz
re3-ab161d12d8cf0326bf072777b7eeef31e8cd516c.tar.zst
re3-ab161d12d8cf0326bf072777b7eeef31e8cd516c.zip
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r--src/peds/Population.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 1566ba3d..e2257a28 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -966,18 +966,11 @@ 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) {
+ if (IsGlass(obj->GetModelIndex())) {
obj->bIsVisible = false;
} else if (obj->GetModelIndex() == MI_BUOY) {
obj->bIsStatic = false;
@@ -996,17 +989,8 @@ 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) {
+ if (IsGlass(obj->GetModelIndex()))
dummy->bIsVisible = false;
- }
CWorld::Remove(obj);
delete obj;