diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-28 01:49:50 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-28 01:49:50 +0100 |
commit | 2d0562412e21ba15e33e2de619e6b2e354afe2d6 (patch) | |
tree | 5dfeaabba6f70545f647a57839d07859e7ff8f7f /src/core | |
parent | Merge pull request #996 from withmorten/vanilla (diff) | |
download | re3-2d0562412e21ba15e33e2de619e6b2e354afe2d6.tar re3-2d0562412e21ba15e33e2de619e6b2e354afe2d6.tar.gz re3-2d0562412e21ba15e33e2de619e6b2e354afe2d6.tar.bz2 re3-2d0562412e21ba15e33e2de619e6b2e354afe2d6.tar.lz re3-2d0562412e21ba15e33e2de619e6b2e354afe2d6.tar.xz re3-2d0562412e21ba15e33e2de619e6b2e354afe2d6.tar.zst re3-2d0562412e21ba15e33e2de619e6b2e354afe2d6.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/World.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp index 62162dcd..0874b680 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -360,7 +360,7 @@ CWorld::ProcessLineOfSightSectorList(CPtrList &list, const CColLine &line, CColP } else if(e->bUsesCollision) colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); - if(colmodel && CCollision::ProcessLineOfSight(line, e->GetMatrix(), *colmodel, point, dist, + if(colmodel && CCollision::ProcessLineOfSight(line, e->GetMatrix(), *colmodel, point, mindist, ignoreSeeThrough)) entity = e; } @@ -431,10 +431,10 @@ CWorld::ProcessVerticalLineSector(CSector §or, const CColLine &line, CColPoi } bool -CWorld::ProcessVerticalLineSectorList(CPtrList &list, const CColLine &line, CColPoint &point, float &mindist, +CWorld::ProcessVerticalLineSectorList(CPtrList &list, const CColLine &line, CColPoint &point, float &dist, CEntity *&entity, bool ignoreSeeThrough, CStoredCollPoly *poly) { - float dist = mindist; + float mindist = dist; CPtrNode *node; CEntity *e; CColModel *colmodel; @@ -445,14 +445,14 @@ CWorld::ProcessVerticalLineSectorList(CPtrList &list, const CColLine &line, CCol e->m_scanCode = GetCurrentScanCode(); colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(); - if(CCollision::ProcessVerticalLine(line, e->GetMatrix(), *colmodel, point, dist, + if(CCollision::ProcessVerticalLine(line, e->GetMatrix(), *colmodel, point, mindist, ignoreSeeThrough, poly)) entity = e; } } - if(dist < mindist) { - mindist = dist; + if(mindist < dist) { + dist = mindist; return true; } else return false; |