summaryrefslogtreecommitdiffstats
path: root/src/render/Occlusion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/Occlusion.cpp')
-rw-r--r--src/render/Occlusion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/Occlusion.cpp b/src/render/Occlusion.cpp
index 3ea5678c..ec7101a6 100644
--- a/src/render/Occlusion.cpp
+++ b/src/render/Occlusion.cpp
@@ -513,8 +513,8 @@ bool CEntity::IsEntityOccluded(void) {
}
if (COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) {
- CVector min = m_matrix * CModelInfo::GetModelInfo(GetModelIndex())->GetColModel()->boundingBox.min;
- CVector max = m_matrix * CModelInfo::GetModelInfo(GetModelIndex())->GetColModel()->boundingBox.max;
+ CVector min = m_matrix * CModelInfo::GetColModel(m_modelIndex)->boundingBox.min;
+ CVector max = m_matrix * CModelInfo::GetColModel(m_modelIndex)->boundingBox.max;
if (CalcScreenCoors(min, &coors) && !COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
if (CalcScreenCoors(CVector(max.x, max.y, min.z), &coors) && !COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;