diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-06-29 17:05:16 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-06-29 17:05:16 +0200 |
commit | 1d620f4b6740ba7e44fd7885462c7ef040a89f77 (patch) | |
tree | cea8dd2512beda0e5e973df75c17c08401aeaa8d /src/control | |
parent | more replay stuff, bug fix (diff) | |
parent | fix (diff) | |
download | re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.gz re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.bz2 re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.lz re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.xz re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.zst re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/CarCtrl.cpp | 1 | ||||
-rw-r--r-- | src/control/CarCtrl.h | 1 | ||||
-rw-r--r-- | src/control/Replay.cpp | 10 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index fe5b6dab..145c643c 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -3,6 +3,7 @@ #include "CarCtrl.h" int &CCarCtrl::NumLawEnforcerCars = *(int*)0x8F1B38; +bool &CCarCtrl::bCarsGeneratedAroundCamera = *(bool*)0x95CD8A; WRAPPER void CCarCtrl::SwitchVehicleToRealPhysics(CVehicle*) { EAXJMP(0x41F7F0); } WRAPPER void CCarCtrl::AddToCarArray(int32 id, int32 vehclass) { EAXJMP(0x4182F0); } diff --git a/src/control/CarCtrl.h b/src/control/CarCtrl.h index 27ea6293..3469dcf1 100644 --- a/src/control/CarCtrl.h +++ b/src/control/CarCtrl.h @@ -11,4 +11,5 @@ public: static int32 ChooseCarModel(int32 vehclass); static int32 &NumLawEnforcerCars; + static bool &bCarsGeneratedAroundCamera; }; diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 7eb19c79..e80d8746 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -212,7 +212,7 @@ void CReplay::RecordThisFrame(void) tGeneralPacket* general = (tGeneralPacket*)&Record.m_pBase[Record.m_nOffset]; general->type = REPLAYPACKET_GENERAL; general->camera_pos.CopyOnlyMatrix(&TheCamera.GetMatrix()); - FindPlayerCoors(general->player_pos); + general->player_pos = FindPlayerCoors(); general->in_rcvehicle = CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle ? true : false; Record.m_nOffset += sizeof(*general); tClockPacket* clock = (tClockPacket*)&Record.m_pBase[Record.m_nOffset]; @@ -727,8 +727,8 @@ void CReplay::RestoreStuffFromMem(void) ped->m_modelIndex = -1; ped->SetModelIndex(mi); ped->m_pVehicleAnim = 0; - ped->uAudioEntityId = DMAudio.CreateEntity(0, ped); - DMAudio.SetEntityStatus(ped->uAudioEntityId, 1); + ped->m_audioEntityId = DMAudio.CreateEntity(0, ped); + DMAudio.SetEntityStatus(ped->m_audioEntityId, true); CPopulation::UpdatePedCount(ped->m_nPedType, false); if (ped->m_wepModelID >= 0) ped->AddWeaponModel(ped->m_wepModelID); @@ -765,8 +765,8 @@ void CReplay::RestoreStuffFromMem(void) car->SetDoorDamage(16, 4, true); /* DOOR_BACK_LEFT */ car->SetDoorDamage(12, 5, true); /* DOOR_BACK_RIGHT */ } - vehicle->uAudioEntityId = DMAudio.CreateEntity(0, vehicle); - DMAudio.SetEntityStatus(vehicle->uAudioEntityId, 1); + vehicle->m_audioEntityId = DMAudio.CreateEntity(0, vehicle); + DMAudio.SetEntityStatus(vehicle->m_audioEntityId, true); CCarCtrl::UpdateCarCount(vehicle, false); if ((mi == MI_AIRTRAIN || mi == MI_DEADDODO) && vehicle->m_rwObject){ CVehicleModelInfo* info = (CVehicleModelInfo*)CModelInfo::GetModelInfo(mi); |