summaryrefslogtreecommitdiffstats
path: root/src/peds/PedPlacement.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-02-22 13:36:22 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-02-22 13:36:22 +0100
commita312e1ff81df0f00f528f237d4014bd5b24dae12 (patch)
tree910dc04b4158a47cdd3b8f6512db84a17cd010f9 /src/peds/PedPlacement.cpp
parentfixes (diff)
parentMerge pull request #329 from erorcun/erorcun (diff)
downloadre3-a312e1ff81df0f00f528f237d4014bd5b24dae12.tar
re3-a312e1ff81df0f00f528f237d4014bd5b24dae12.tar.gz
re3-a312e1ff81df0f00f528f237d4014bd5b24dae12.tar.bz2
re3-a312e1ff81df0f00f528f237d4014bd5b24dae12.tar.lz
re3-a312e1ff81df0f00f528f237d4014bd5b24dae12.tar.xz
re3-a312e1ff81df0f00f528f237d4014bd5b24dae12.tar.zst
re3-a312e1ff81df0f00f528f237d4014bd5b24dae12.zip
Diffstat (limited to 'src/peds/PedPlacement.cpp')
-rw-r--r--src/peds/PedPlacement.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/peds/PedPlacement.cpp b/src/peds/PedPlacement.cpp
index 8a40e56f..42cabbc2 100644
--- a/src/peds/PedPlacement.cpp
+++ b/src/peds/PedPlacement.cpp
@@ -41,6 +41,14 @@ CPedPlacement::IsPositionClearOfCars(CVector* pos)
return CWorld::TestSphereAgainstWorld(*pos, 0.25f, nil, true, true, false, false, false, false);
}
+bool
+CPedPlacement::IsPositionClearForPed(CVector* pos)
+{
+ int16 count;
+ CWorld::FindObjectsKindaColliding(*pos, 0.75f, true, &count, 2, nil, false, true, true, false, false);
+ return count == 0;
+}
+
STARTPATCHES
InjectHook(0x4EE340, &CPedPlacement::FindZCoorForPed, PATCH_JUMP);
InjectHook(0x4EE310, &CPedPlacement::IsPositionClearOfCars, PATCH_JUMP);