From 4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 16 May 2020 13:31:23 +0300 Subject: minimal weather stuff + multiple bugfixes --- src/control/Replay.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/control/Replay.cpp') diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index ab187c10..abd96112 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -17,6 +17,7 @@ #include "ModelInfo.h" #include "Object.h" #include "Pad.h" +#include "PedAttractor.h" #include "Phones.h" #include "Pickups.h" #include "Plane.h" @@ -1116,6 +1117,14 @@ void CReplay::StoreStuffInMem(void) for (int i = 0; i < NUMPLAYERS; i++) nHandleOfPlayerPed[i] = CPools::GetPedPool()->GetIndex(CWorld::Players[i].m_pPed); #endif + int i = CPools::GetPedPool()->GetSize(); + while (--i >= 0) { + CPed* ped = CPools::GetPedPool()->GetSlot(i); + if (!ped) + continue; + if (ped->m_attractor) + GetPedAttractorManager()->DeRegisterPed(ped, ped->m_attractor); + } CPools::GetVehiclePool()->Store(pBuf0, pBuf1); CPools::GetPedPool()->Store(pBuf2, pBuf3); CPools::GetObjectPool()->Store(pBuf4, pBuf5); -- cgit v1.2.3