From 93e99299250fbc5e459883b514b871f6009edfc6 Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 23 May 2021 17:49:55 +0200 Subject: CEntity and C(Vu)Vector fixes and cleanup --- src/render/Occlusion.cpp | 4 ++-- src/render/Shadows.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/render') 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; diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp index ae079821..dd87bff6 100644 --- a/src/render/Shadows.cpp +++ b/src/render/Shadows.cpp @@ -1406,7 +1406,7 @@ CShadows::CastShadowSectorList(CPtrList &PtrList, float fStartX, float fStartY, { pEntity->m_scanCode = CWorld::GetCurrentScanCode(); - if ( pEntity->bUsesCollision && !pEntity->m_flagE2 ) + if ( pEntity->bUsesCollision && !pEntity->bDontCastShadowsOn) { if ( IsAreaVisible(pEntity->m_area) ) { -- cgit v1.2.3