CEntity and C(Vu)Vector fixes and cleanup

This commit is contained in:
aap 2021-05-23 17:49:55 +02:00 committed by Sergeanur
parent be019c6126
commit 93e9929925
13 changed files with 57 additions and 52 deletions

View file

@ -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;