summaryrefslogtreecommitdiffstats
path: root/src/peds/PlayerPed.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-03-01 02:43:30 +0100
committereray orçunus <erayorcunus@gmail.com>2020-03-01 02:44:58 +0100
commitae523a09a7c12ff3c1fd9cb61e741cf09702b3fe (patch)
treeaf779a144813d519e312398ba77cfdbeb9260420 /src/peds/PlayerPed.cpp
parentMerge pull request #338 from erorcun/erorcun (diff)
downloadre3-ae523a09a7c12ff3c1fd9cb61e741cf09702b3fe.tar
re3-ae523a09a7c12ff3c1fd9cb61e741cf09702b3fe.tar.gz
re3-ae523a09a7c12ff3c1fd9cb61e741cf09702b3fe.tar.bz2
re3-ae523a09a7c12ff3c1fd9cb61e741cf09702b3fe.tar.lz
re3-ae523a09a7c12ff3c1fd9cb61e741cf09702b3fe.tar.xz
re3-ae523a09a7c12ff3c1fd9cb61e741cf09702b3fe.tar.zst
re3-ae523a09a7c12ff3c1fd9cb61e741cf09702b3fe.zip
Diffstat (limited to '')
-rw-r--r--src/peds/PlayerPed.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index 9d4adcef..b459ed84 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -79,7 +79,11 @@ void
CPlayerPed::MakeObjectTargettable(int32 handle)
{
for (int i = 0; i < ARRAY_SIZE(m_nTargettableObjects); i++) {
- if (CPools::GetObjectPool()->GetAt(m_nTargettableObjects[i]) == nil) {
+ if (
+#ifdef FIX_BUGS
+ m_nTargettableObjects[i] == -1 ||
+#endif
+ CPools::GetObjectPool()->GetAt(m_nTargettableObjects[i]) == nil) {
m_nTargettableObjects[i] = handle;
return;
}