From 2ae112fdf6b90bb4435dba34bcc2a23604e1e158 Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 8 Jul 2019 21:37:47 +0200 Subject: more CAutomobile --- src/control/Replay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/control') diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 9041a003..56e37dae 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -1012,7 +1012,7 @@ void CReplay::ProcessReplayCamera(void) default: break; } - TheCamera.m_vecGameCamPos = *TheCamera.GetMatrix().GetPosition(); + TheCamera.m_vecGameCamPos = TheCamera.GetMatrix().GetPosition(); TheCamera.CalculateDerivedValues(); RwMatrixUpdate(RwFrameGetMatrix(RwCameraGetFrame(TheCamera.m_pRwCamera))); RwFrameUpdateObjects(RwCameraGetFrame(TheCamera.m_pRwCamera)); -- cgit v1.2.3 From 74fcbc8c0a6bbac8e8057655c5f1133e15c63656 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 9 Jul 2019 09:57:44 +0200 Subject: more CAutomobile --- src/control/AutoPilot.h | 6 +++--- src/control/Replay.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/control') diff --git a/src/control/AutoPilot.h b/src/control/AutoPilot.h index 97b02f5c..351fd117 100644 --- a/src/control/AutoPilot.h +++ b/src/control/AutoPilot.h @@ -59,9 +59,9 @@ enum eCarDrivingStyle : uint8 class CAutoPilot { public: - void *m_currentAddress; - void *m_startingRouteNode; - void *m_PreviousRouteNode; + uint32 m_currentAddress; + uint32 m_startingRouteNode; + uint32 m_PreviousRouteNode; uint32 m_nTotalSpeedScaleFactor; uint32 m_nSpeedScaleFactor; uint32 m_nCurrentPathNodeInfo; diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 56e37dae..2bdb9dfe 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -290,14 +290,14 @@ void CReplay::RecordThisFrame(void) CPed* p = peds->GetSlot(i); if (!p || !p->m_rwObject) continue; - if (!p->bRecordedForReplay){ + if (!p->bHasAlreadyBeenRecorded){ tPedHeaderPacket* ph = (tPedHeaderPacket*)&Record.m_pBase[Record.m_nOffset]; ph->type = REPLAYPACKET_PED_HEADER; ph->index = i; ph->mi = p->GetModelIndex(); ph->pedtype = p->m_nPedType; Record.m_nOffset += sizeof(*ph); - p->bRecordedForReplay = true; + p->bHasAlreadyBeenRecorded = true; } StorePedUpdate(p, i); } @@ -1346,14 +1346,14 @@ void CReplay::MarkEverythingAsNew(void) CVehicle* v = CPools::GetVehiclePool()->GetSlot(i); if (!v) continue; - v->bRecordedForReplay = false; + v->bHasAlreadyBeenRecorded = false; } i = CPools::GetPedPool()->GetSize(); while (i--) { CPed* p = CPools::GetPedPool()->GetSlot(i); if (!p) continue; - p->bRecordedForReplay = false; + p->bHasAlreadyBeenRecorded = false; } } #endif -- cgit v1.2.3 From a65dd41da736a12866526abc1405cbaa154771a8 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 9 Jul 2019 18:50:35 +0200 Subject: yet more CAutomobile --- src/control/Darkel.cpp | 8 ++++---- src/control/Darkel.h | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src/control') diff --git a/src/control/Darkel.cpp b/src/control/Darkel.cpp index f050a540..ab28f96e 100644 --- a/src/control/Darkel.cpp +++ b/src/control/Darkel.cpp @@ -123,18 +123,18 @@ eKillFrenzyStatus CDarkel::ReadStatus() } #if 1 -WRAPPER int32 CDarkel::RegisterCarBlownUpByPlayer(eKillFrenzyStatus status) { EAXJMP(0x421070); } +WRAPPER void CDarkel::RegisterCarBlownUpByPlayer(CVehicle *vehicle) { EAXJMP(0x421070); } #else -int32 CDarkel::RegisterCarBlownUpByPlayer(eKillFrenzyStatus status) +int32 CDarkel::RegisterCarBlownUpByPlayer(CVehicle *vehicle) { return 0; } #endif #if 1 -WRAPPER void CDarkel::RegisterKillByPlayer(int32 modelid, eWeaponType weapontype, bool flag) { EAXJMP(0x420F60); } +WRAPPER void CDarkel::RegisterKillByPlayer(CPed *victim, eWeaponType weapontype, bool headshot) { EAXJMP(0x420F60); } #else -void CDarkel::RegisterKillByPlayer(int32 modelid, eWeaponType weapontype, bool flag) +void CDarkel::RegisterKillByPlayer(CPed *victim, eWeaponType weapontype, bool headshot) { diff --git a/src/control/Darkel.h b/src/control/Darkel.h index da1df24a..35d849d2 100644 --- a/src/control/Darkel.h +++ b/src/control/Darkel.h @@ -1,6 +1,9 @@ #pragma once #include "Weapon.h" +class CVehicle; +class CPed; + enum eKillFrenzyStatus { KILLFRENZY_NONE, @@ -37,8 +40,8 @@ public: static void Init(); static int16 QueryModelsKilledByPlayer(int32 modelId); static eKillFrenzyStatus ReadStatus(); - static int32 RegisterCarBlownUpByPlayer(eKillFrenzyStatus status); - static void RegisterKillByPlayer(int32 modelid, eWeaponType weapontype, bool flag); + static void RegisterCarBlownUpByPlayer(CVehicle *vehicle); + static void RegisterKillByPlayer(CPed *victim, eWeaponType weapontype, bool headshot = false); static void RegisterKillNotByPlayer(); static void ResetModelsKilledByPlayer(); static void ResetOnPlayerDeath(); -- cgit v1.2.3