summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-09 22:39:29 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-09 22:39:29 +0200
commitca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1 (patch)
tree22019f7aa3ed57061c581ae837b6f4f3751d3822 /src/control
parentRunningScript: 1/12 (diff)
parentyet more CAutomobile (diff)
downloadre3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.gz
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.bz2
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.lz
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.xz
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.zst
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/AutoPilot.h6
-rw-r--r--src/control/Darkel.cpp8
-rw-r--r--src/control/Darkel.h7
-rw-r--r--src/control/Replay.cpp10
4 files changed, 17 insertions, 14 deletions
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/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();
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 9041a003..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);
}
@@ -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));
@@ -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