diff options
Diffstat (limited to 'src/control/Restart.cpp')
-rw-r--r-- | src/control/Restart.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/control/Restart.cpp b/src/control/Restart.cpp index a6482d04..052e6b61 100644 --- a/src/control/Restart.cpp +++ b/src/control/Restart.cpp @@ -4,6 +4,8 @@ #include "Zones.h" #include "PathFind.h" +//--MIAMI: file done + uint8 CRestart::OverrideHospitalLevel; uint8 CRestart::OverridePoliceStationLevel; bool CRestart::bFadeInAfterNextArrest; @@ -80,13 +82,13 @@ CRestart::FindClosestHospitalRestartPoint(const CVector &pos, CVector *outPos, f return; } - eLevelName curlevel = CTheZones::FindZoneForPoint(pos); + eLevelName curlevel = CTheZones::GetLevelFromPosition(&pos); float fMinDist = 16000000.0f; int closestPoint = NUM_RESTART_POINTS; // find closest point on this level for (int i = 0; i < NumberOfHospitalRestarts; i++) { - if (CTheZones::FindZoneForPoint(HospitalRestartPoints[i]) == (OverrideHospitalLevel != LEVEL_GENERIC ? OverrideHospitalLevel : curlevel)) { + if (CTheZones::GetLevelFromPosition(&HospitalRestartPoints[i]) == (OverrideHospitalLevel != LEVEL_GENERIC ? OverrideHospitalLevel : curlevel)) { float dist = (pos - HospitalRestartPoints[i]).MagnitudeSqr(); if (fMinDist >= dist) { fMinDist = dist; @@ -127,13 +129,13 @@ CRestart::FindClosestPoliceRestartPoint(const CVector &pos, CVector *outPos, flo return; } - eLevelName curlevel = CTheZones::FindZoneForPoint(pos); + eLevelName curlevel = CTheZones::GetLevelFromPosition(&pos); float fMinDist = 16000000.0f; int closestPoint = NUM_RESTART_POINTS; // find closest point on this level for (int i = 0; i < NumberOfPoliceRestarts; i++) { - if (CTheZones::FindZoneForPoint(PoliceRestartPoints[i]) == (OverridePoliceStationLevel != LEVEL_GENERIC ? OverridePoliceStationLevel : curlevel)) { + if (CTheZones::GetLevelFromPosition(&PoliceRestartPoints[i]) == (OverridePoliceStationLevel != LEVEL_GENERIC ? OverridePoliceStationLevel : curlevel)) { float dist = (pos - PoliceRestartPoints[i]).MagnitudeSqr(); if (fMinDist >= dist) { fMinDist = dist; |