From 4a36d64f15f898854bb8a76be86ac9a8c536b291 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 10 Jul 2019 17:18:26 +0200 Subject: added wrappers around math functions --- src/core/Streaming.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/Streaming.cpp') diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index f8ab19d4..a23e35be 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -2131,8 +2131,8 @@ CStreaming::DeleteRwObjectsAfterDeath(const CVector &pos) for(x = 0; x < NUMSECTORS_X; x++) for(y = 0; y < NUMSECTORS_Y; y++) - if(fabs(ix - x) > 3.0f && - fabs(iy - y) > 3.0f){ + if(Abs(ix - x) > 3.0f && + Abs(iy - y) > 3.0f){ sect = CWorld::GetSector(x, y); DeleteRwObjectsInSectorList(sect->m_lists[ENTITYLIST_BUILDINGS]); DeleteRwObjectsInSectorList(sect->m_lists[ENTITYLIST_BUILDINGS_OVERLAP]); @@ -2158,7 +2158,7 @@ CStreaming::DeleteRwObjectsBehindCamera(int32 mem) ix = CWorld::GetSectorIndexX(TheCamera.GetPosition().x); iy = CWorld::GetSectorIndexX(TheCamera.GetPosition().y); - if(fabs(TheCamera.GetForward().x) > fabs(TheCamera.GetForward().y)){ + if(Abs(TheCamera.GetForward().x) > Abs(TheCamera.GetForward().y)){ // looking west/east ymin = max(iy - 10, 0); @@ -2312,13 +2312,13 @@ CStreaming::DeleteRwObjectsInOverlapSectorList(CPtrList &list, int32 x, int32 y) e = (CEntity*)node->item; if(e->m_rwObject && !e->bStreamingDontDelete && !e->bImBeingRendered){ // Now this is pretty weird... - if(fabs(CWorld::GetSectorIndexX(e->GetPosition().x) - x) >= 2.0f) + if(Abs(CWorld::GetSectorIndexX(e->GetPosition().x) - x) >= 2.0f) // { e->DeleteRwObject(); // return; // BUG? // } else // FIX? - if(fabs(CWorld::GetSectorIndexY(e->GetPosition().y) - y) >= 2.0f) + if(Abs(CWorld::GetSectorIndexY(e->GetPosition().y) - y) >= 2.0f) e->DeleteRwObject(); } } -- cgit v1.2.3