summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-24 14:00:45 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-24 14:00:45 +0200
commit8c510a8d5bf5b68f4e5be69c9c8110991686504e (patch)
treefe25ced5446a7c4b9829d41f3e6d61a3ed76c32e /src/control/Script.cpp
parentsay goodbye to your saves (diff)
downloadre3-8c510a8d5bf5b68f4e5be69c9c8110991686504e.tar
re3-8c510a8d5bf5b68f4e5be69c9c8110991686504e.tar.gz
re3-8c510a8d5bf5b68f4e5be69c9c8110991686504e.tar.bz2
re3-8c510a8d5bf5b68f4e5be69c9c8110991686504e.tar.lz
re3-8c510a8d5bf5b68f4e5be69c9c8110991686504e.tar.xz
re3-8c510a8d5bf5b68f4e5be69c9c8110991686504e.tar.zst
re3-8c510a8d5bf5b68f4e5be69c9c8110991686504e.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index e029ad35..cf2545c0 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -11364,7 +11364,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command)
case COMMAND_CLEAR_CHAR_FOLLOW_PATH:
{
CollectParameters(&m_nIp, 2);
- CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
+ CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
assert(pPed);
if (pPed->GetPedState() == PED_FOLLOW_PATH) {
pPed->RestorePreviousState();
@@ -11375,7 +11375,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command)
case COMMAND_SET_CHAR_CAN_BE_SHOT_IN_VEHICLE:
{
CollectParameters(&m_nIp, 2);
- CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
+ CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
assert(pPed);
pPed->bCanBeShotInVehicle = ScriptParams[1];
return 0;