diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-06-29 15:55:19 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-06-29 15:55:19 +0200 |
commit | 0974447f585a457ea7d68187db28bcec5aa269e2 (patch) | |
tree | 6f7cf38dc4ea9a17b1bc6125fcc69758cf535e34 /src/control | |
parent | Merge branch 'master' of git://github.com/GTAmodding/re3 into erorcun (diff) | |
parent | fix (diff) | |
download | re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.gz re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.bz2 re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.lz re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.xz re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.zst re3-0974447f585a457ea7d68187db28bcec5aa269e2.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/Population.cpp | 2 | ||||
-rw-r--r-- | src/control/Population.h | 1 | ||||
-rw-r--r-- | src/control/Replay.cpp | 12 | ||||
-rw-r--r-- | src/control/Replay.h | 1 |
6 files changed, 13 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/Population.cpp b/src/control/Population.cpp index fd1a89f5..7b1acaaf 100644 --- a/src/control/Population.cpp +++ b/src/control/Population.cpp @@ -1,8 +1,10 @@ #include "common.h" #include "patcher.h" +#include "Game.h" #include "Population.h" PedGroup *CPopulation::ms_pPedGroups = (PedGroup*)0x6E9248; bool &CPopulation::ms_bGivePedsWeapons = *(bool*)0x95CCF6; WRAPPER void CPopulation::UpdatePedCount(uint32, bool) { EAXJMP(0x4F5A60); } +WRAPPER void CPopulation::DealWithZoneChange(eLevelName oldLevel, eLevelName newLevel, bool) { EAXJMP(0x4F6200); } diff --git a/src/control/Population.h b/src/control/Population.h index 76442442..e93e14fc 100644 --- a/src/control/Population.h +++ b/src/control/Population.h @@ -14,4 +14,5 @@ public: static bool &ms_bGivePedsWeapons; static void UpdatePedCount(uint32, bool); + static void DealWithZoneChange(eLevelName oldLevel, eLevelName newLevel, bool); }; diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 8003b407..055c4ada 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -165,6 +165,8 @@ void CReplay::Init(void) bDoLoadSceneWhenDone = false; } +WRAPPER void CReplay::EmptyReplayBuffer(void) { EAXJMP(0x595BD0); } + void CReplay::DisableReplays(void) { bReplayEnabled = false; @@ -212,7 +214,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]; @@ -601,8 +603,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); @@ -639,8 +641,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); diff --git a/src/control/Replay.h b/src/control/Replay.h index b622788f..c4f3b1a2 100644 --- a/src/control/Replay.h +++ b/src/control/Replay.h @@ -244,6 +244,7 @@ private: public: static void Init(void); + static void EmptyReplayBuffer(void); static void DisableReplays(void); static void EnableReplays(void); static void Update(void); |