diff options
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/CarGen.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index 16401008..a1d58ab2 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -57,7 +57,8 @@ void CCarGenerator::DoInternalProcessing() mi = -m_nModelIndex; if (m_nModelIndex == -1 || !CStreaming::HasModelLoaded(mi)) { CZoneInfo pZone; - CTheZones::GetZoneInfoForTimeOfDay(&FindPlayerCoors(), &pZone); + CVector pos = FindPlayerCoors(); + CTheZones::GetZoneInfoForTimeOfDay(&pos, &pZone); mi = CCarCtrl::ChooseCarModel(CCarCtrl::ChooseCarRating(&pZone)); if (mi < 0) return; @@ -186,7 +187,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; } |