summaryrefslogtreecommitdiffstats
path: root/src/vehicles/CarGen.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-16 12:31:23 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-16 12:31:23 +0200
commit4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e (patch)
treec792ebb3effbb2d45c05185c294f34fe17c97a0b /src/vehicles/CarGen.cpp
parentmore attractor fixes (diff)
downloadre3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.gz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.bz2
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.lz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.xz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.zst
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.zip
Diffstat (limited to 'src/vehicles/CarGen.cpp')
-rw-r--r--src/vehicles/CarGen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp
index 16401008..7c02f3ee 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -186,7 +186,7 @@ bool CCarGenerator::CheckForBlockage(int32 mi)
CWorld::FindObjectsKindaColliding(CVector(m_vecPos), pColModel->boundingSphere.radius, 1, &entities, 8, pEntities, false, true, true, false, false);
for (int i = 0; i < entities; i++) {
if (m_vecPos.z + pColModel->boundingBox.min.z < pEntities[i]->GetPosition().z + pEntities[i]->GetColModel()->boundingBox.max.z + 1.0f &&
- m_vecPos.z + pColModel->boundingBox.max.z < pEntities[i]->GetPosition().z + pEntities[i]->GetColModel()->boundingBox.min.z - 1.0f) {
+ m_vecPos.z + pColModel->boundingBox.max.z > pEntities[i]->GetPosition().z + pEntities[i]->GetColModel()->boundingBox.min.z - 1.0f) {
m_bIsBlocking = true;
return true;
}