diff options
Diffstat (limited to 'src/peds/PedPlacement.cpp')
-rw-r--r-- | src/peds/PedPlacement.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/peds/PedPlacement.cpp b/src/peds/PedPlacement.cpp index 2d4a92fa..8012650a 100644 --- a/src/peds/PedPlacement.cpp +++ b/src/peds/PedPlacement.cpp @@ -4,7 +4,8 @@ #include "PedPlacement.h" #include "World.h" -void +// --MIAMI: Done +bool CPedPlacement::FindZCoorForPed(CVector* pos) { float zForPed; @@ -32,8 +33,11 @@ CPedPlacement::FindZCoorForPed(CVector* pos) zForPed = Max(foundColZ, foundColZ2); - if (zForPed > -99.0f) + if (zForPed > -99.0f) { pos->z = FEET_OFFSET + zForPed; + return true; + } + return false; } CEntity* @@ -43,9 +47,13 @@ CPedPlacement::IsPositionClearOfCars(Const CVector *pos) } bool -CPedPlacement::IsPositionClearForPed(CVector* pos) +CPedPlacement::IsPositionClearForPed(const CVector& pos, float radius, int total, CEntity** entities) { int16 count; - CWorld::FindObjectsKindaColliding(*pos, 0.75f, true, &count, 2, nil, false, true, true, false, false); + if (radius == -1.0f) + radius = 0.75f; + if (total == -1) + total = 2; + CWorld::FindObjectsKindaColliding(pos, radius, true, &count, total, entities, false, true, true, false, false); return count == 0; } |