summaryrefslogtreecommitdiffstats
path: root/src/core/World.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-01-28 01:49:50 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-01-28 01:57:12 +0100
commite1e4be9017246cc6b4d14d5b5d346c5c142941c0 (patch)
treedd261b86bc6cf007aacd9ba222cda353c173bb1b /src/core/World.cpp
parentMerge pull request #1000 from withmorten/miami-vanilla (diff)
downloadre3-e1e4be9017246cc6b4d14d5b5d346c5c142941c0.tar
re3-e1e4be9017246cc6b4d14d5b5d346c5c142941c0.tar.gz
re3-e1e4be9017246cc6b4d14d5b5d346c5c142941c0.tar.bz2
re3-e1e4be9017246cc6b4d14d5b5d346c5c142941c0.tar.lz
re3-e1e4be9017246cc6b4d14d5b5d346c5c142941c0.tar.xz
re3-e1e4be9017246cc6b4d14d5b5d346c5c142941c0.tar.zst
re3-e1e4be9017246cc6b4d14d5b5d346c5c142941c0.zip
Diffstat (limited to '')
-rw-r--r--src/core/World.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 9da36e7a..ef1cc948 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -367,7 +367,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, ignoreShootThrough))
entity = e;
if(carTyres && ((CVehicle*)e)->SetUpWheelColModel(&tyreCol) && CCollision::ProcessLineOfSight(line, e->GetMatrix(), tyreCol, tyreColPoint, tyreDist, false, ignoreShootThrough)){
@@ -452,10 +452,10 @@ CWorld::ProcessVerticalLineSector(CSector &sector, 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;
@@ -466,14 +466,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, false, poly))
entity = e;
}
}
- if(dist < mindist) {
- mindist = dist;
+ if(mindist < dist) {
+ dist = mindist;
return true;
} else
return false;