summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-05 14:21:13 +0200
committeraap <aap@papnet.eu>2020-05-05 14:21:13 +0200
commitb3b9be5e8cc5ac5d1ec262fc95ac094d10b02257 (patch)
treec300d6c36323e27226fe7ad0782cf945a26859f8 /src/entities
parentimplemented most of streamed collisions and big buildings (diff)
parentMake CBaseModelInfo fields protected (diff)
downloadre3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.gz
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.bz2
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.lz
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.xz
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.tar.zst
re3-b3b9be5e8cc5ac5d1ec262fc95ac094d10b02257.zip
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Building.cpp2
-rw-r--r--src/entities/Entity.cpp6
-rw-r--r--src/entities/Entity.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/entities/Building.cpp b/src/entities/Building.cpp
index aad2d402..3c096636 100644
--- a/src/entities/Building.cpp
+++ b/src/entities/Building.cpp
@@ -12,7 +12,7 @@ CBuilding::ReplaceWithNewModel(int32 id)
{
DeleteRwObject();
- if(CModelInfo::GetModelInfo(m_modelIndex)->m_refCount == 0)
+ if (CModelInfo::GetModelInfo(m_modelIndex)->GetNumRefs() == 0)
CStreaming::RemoveModel(m_modelIndex);
m_modelIndex = id;
diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp
index 8014a47a..955f32a8 100644
--- a/src/entities/Entity.cpp
+++ b/src/entities/Entity.cpp
@@ -474,7 +474,7 @@ CEntity::PreRender(void)
break;
}
- if(CModelInfo::GetModelInfo(GetModelIndex())->m_num2dEffects != 0)
+ if (CModelInfo::GetModelInfo(GetModelIndex())->GetNum2dEffects() != 0)
ProcessLightsForEntity();
}
@@ -633,7 +633,7 @@ CEntity::AddSteamsFromGround(CVector *unused)
C2dEffect *effect;
CVector pos;
- n = CModelInfo::GetModelInfo(GetModelIndex())->m_num2dEffects;
+ n = CModelInfo::GetModelInfo(GetModelIndex())->GetNum2dEffects();
for(i = 0; i < n; i++){
effect = CModelInfo::GetModelInfo(GetModelIndex())->Get2dEffect(i);
if(effect->type != EFFECT_PARTICLE)
@@ -676,7 +676,7 @@ CEntity::ProcessLightsForEntity(void)
flashTimer2 = 0;
flashTimer3 = 0;
- n = CModelInfo::GetModelInfo(GetModelIndex())->m_num2dEffects;
+ n = CModelInfo::GetModelInfo(GetModelIndex())->GetNum2dEffects();
for(i = 0; i < n; i++, flashTimer1 += 0x80, flashTimer2 += 0x100, flashTimer3 += 0x200){
effect = CModelInfo::GetModelInfo(GetModelIndex())->Get2dEffect(i);
diff --git a/src/entities/Entity.h b/src/entities/Entity.h
index 94022224..49c6932c 100644
--- a/src/entities/Entity.h
+++ b/src/entities/Entity.h
@@ -159,7 +159,7 @@ public:
bool GetIsOnScreenAndNotCulled(void);
bool IsVisible(void) { return m_rwObject && bIsVisible && GetIsOnScreen(); }
bool IsVisibleComplex(void) { return m_rwObject && bIsVisible && GetIsOnScreenComplex(); }
- int GetModelIndex(void) { return m_modelIndex; }
+ int16 GetModelIndex(void) const { return m_modelIndex; }
void UpdateRwFrame(void);
void SetupBigBuilding(void);