summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-07-13 17:10:59 +0200
committerGitHub <noreply@github.com>2021-07-13 17:10:59 +0200
commitd2e594db2b1290299891543418145cd16576e465 (patch)
tree5c575b60e4c8f789f1cdd7a2fd9df26ba58f39cd /src/peds
parentfix premake (diff)
parentFix NearPed count going negative (diff)
downloadre3-d2e594db2b1290299891543418145cd16576e465.tar
re3-d2e594db2b1290299891543418145cd16576e465.tar.gz
re3-d2e594db2b1290299891543418145cd16576e465.tar.bz2
re3-d2e594db2b1290299891543418145cd16576e465.tar.lz
re3-d2e594db2b1290299891543418145cd16576e465.tar.xz
re3-d2e594db2b1290299891543418145cd16576e465.tar.zst
re3-d2e594db2b1290299891543418145cd16576e465.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 5b52d021..9be58d11 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -326,6 +326,7 @@ CPed::~CPed(void)
nearPed->m_nearPeds[k] = nearPed->m_nearPeds[k + 1];
nearPed->m_nearPeds[k + 1] = nil;
}
+ nearPed->m_nearPeds[ARRAY_SIZE(m_nearPeds) - 1] = nil;
nearPed->m_numNearPeds--;
} else
j++;