From 5bedca7692490914ad2545767a6f1aa1fd46f386 Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 20 Jul 2020 23:25:04 +0200 Subject: fixed COcclusion --- src/entities/Entity.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/entities/Entity.cpp') diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index f85dda21..63ea03fc 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -1160,12 +1160,11 @@ bool IsEntityPointerValid(CEntity* pEntity) } bool CEntity::IsEntityOccluded(void) { - return false; CVector coors; float width, height; - if (!COcclusion::NumActiveOccluders || !CalcScreenCoors(GetBoundCentre(), &coors, &width, &height)) + if (COcclusion::NumActiveOccluders == 0 || !CalcScreenCoors(GetBoundCentre(), &coors, &width, &height)) return false; float area = Max(width, height) * GetBoundRadius() * 0.9f; -- cgit v1.2.3