From 1f98f01dcb006783755bd58fa458bb515626b2dd Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 9 Aug 2021 18:14:19 +0300 Subject: Fix a bunch of CModelInfo::GetModelInfo->GetColModel calls --- src/core/World.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/World.cpp') diff --git a/src/core/World.cpp b/src/core/World.cpp index 6e8314f4..1c34a633 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -358,7 +358,7 @@ CWorld::ProcessLineOfSightSectorList(CPtrList &list, const CColLine &line, CColP } else colmodel = nil; } else if(e->bUsesCollision) - colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); + colmodel = CModelInfo::GetColModel(e->GetModelIndex()); if(colmodel && CCollision::ProcessLineOfSight(line, e->GetMatrix(), *colmodel, point, mindist, ignoreSeeThrough)) @@ -444,7 +444,7 @@ CWorld::ProcessVerticalLineSectorList(CPtrList &list, const CColLine &line, CCol if(e->m_scanCode != GetCurrentScanCode() && e->bUsesCollision) { e->m_scanCode = GetCurrentScanCode(); - colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); + colmodel = CModelInfo::GetColModel(e->GetModelIndex()); if(CCollision::ProcessVerticalLine(line, e->GetMatrix(), *colmodel, point, mindist, ignoreSeeThrough, poly)) entity = e; @@ -645,7 +645,7 @@ CWorld::GetIsLineOfSightSectorListClear(CPtrList &list, const CColLine &line, bo if(e != pIgnoreEntity && !(ignoreSomeObjects && CameraToIgnoreThisObject(e))) { - colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); + colmodel = CModelInfo::GetColModel(e->GetModelIndex()); if(CCollision::TestLineOfSight(line, e->GetMatrix(), *colmodel, ignoreSeeThrough)) return false; @@ -955,7 +955,7 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad float distance = diff.Magnitude(); if(e->GetBoundRadius() + radius > distance) { - CColModel *eCol = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); + CColModel *eCol = CModelInfo::GetColModel(e->GetModelIndex()); int collidedSpheres = CCollision::ProcessColModels(sphereMat, OurColModel, e->GetMatrix(), *eCol, gaTempSphereColPoints, nil, nil); -- cgit v1.2.3