summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-16 12:31:23 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-16 12:31:23 +0200
commit4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e (patch)
treec792ebb3effbb2d45c05185c294f34fe17c97a0b /src/control
parentmore attractor fixes (diff)
downloadre3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.gz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.bz2
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.lz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.xz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.zst
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.zip
Diffstat (limited to '')
-rw-r--r--src/control/Replay.cpp9
-rw-r--r--src/control/Script.cpp8
2 files changed, 11 insertions, 6 deletions
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);
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 8342ef46..cd0ea5b3 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -5248,12 +5248,8 @@ int8 CRunningScript::ProcessCommands500To599(int32 command)
ScriptParams[3] / 255.0f, ScriptParams[4] / 255.0f, ScriptParams[5] / 255.0f, 0, true);
return 0;
}
- case COMMAND_STORE_WEATHER:
- CWeather::StoreWeatherState();
- return 0;
- case COMMAND_RESTORE_WEATHER:
- CWeather::RestoreWeatherState();
- return 0;
+ //case COMMAND_STORE_WEATHER:
+ //case COMMAND_RESTORE_WEATHER:
case COMMAND_STORE_CLOCK:
CClock::StoreClock();
return 0;