summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-04-15 18:19:45 +0200
committereray orçunus <erayorcunus@gmail.com>2020-04-15 18:19:45 +0200
commit4da1879975ef28cb7f406166d62d154d03ef47d2 (patch)
tree42f2049c82fdd99386ce7346294482ed52940520 /src/peds
parentfix CTheCarGenerators::SaveAllCarGenerators (diff)
downloadre3-4da1879975ef28cb7f406166d62d154d03ef47d2.tar
re3-4da1879975ef28cb7f406166d62d154d03ef47d2.tar.gz
re3-4da1879975ef28cb7f406166d62d154d03ef47d2.tar.bz2
re3-4da1879975ef28cb7f406166d62d154d03ef47d2.tar.lz
re3-4da1879975ef28cb7f406166d62d154d03ef47d2.tar.xz
re3-4da1879975ef28cb7f406166d62d154d03ef47d2.tar.zst
re3-4da1879975ef28cb7f406166d62d154d03ef47d2.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.cpp17
-rw-r--r--src/peds/Ped.h10
-rw-r--r--src/peds/Population.cpp60
3 files changed, 42 insertions, 45 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index cee2b323..d6077ed8 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -62,7 +62,7 @@
CPed *gapTempPedList[50];
uint16 gnNumTempPedList;
-CColPoint &aTempPedColPts = *(CColPoint*)0x62DB14;
+CColPoint aTempPedColPts[MAX_COLLISION_POINTS];
// Corresponds to ped sounds (from SOUND_PED_DEATH to SOUND_PED_TAXI_CALL)
PedAudioData CommentWaitTime[39] = {
@@ -106,8 +106,6 @@ PedAudioData CommentWaitTime[39] = {
{1000, 1000, 1000, 1000},
{1000, 1000, 5000, 5000},
};
-// *(CPedAudioData(*)[39]) * (uintptr*)0x5F94C4;
-
uint16 nPlayerInComboMove;
RpClump *flyingClumpTemp;
@@ -139,10 +137,9 @@ FightMove tFightMoves[NUM_FIGHTMOVES] = {
{ANIM_HIT_BEHIND, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0},
{ANIM_FIGHT2_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0},
};
-// *(FightMove(*)[NUM_FIGHTMOVES])* (uintptr*)0x5F9844;
-uint16 &CPed::nThreatReactionRangeMultiplier = *(uint16*)0x5F8C98;
-uint16 &CPed::nEnterCarRangeMultiplier = *(uint16*)0x5F8C94;
+uint16 CPed::nThreatReactionRangeMultiplier = 1;
+uint16 CPed::nEnterCarRangeMultiplier = 1;
CVector vecPedCarDoorAnimOffset;
CVector vecPedCarDoorLoAnimOffset;
@@ -151,9 +148,9 @@ CVector vecPedQuickDraggedOutCarAnimOffset;
CVector vecPedDraggedOutCarAnimOffset;
CVector vecPedTrainDoorAnimOffset;
-bool &CPed::bNastyLimbsCheat = *(bool*)0x95CD44;
-bool &CPed::bPedCheat2 = *(bool*)0x95CD5A;
-bool &CPed::bPedCheat3 = *(bool*)0x95CD59;
+bool CPed::bNastyLimbsCheat;
+bool CPed::bPedCheat2;
+bool CPed::bPedCheat3;
CVector2D CPed::ms_vec2DFleePosition;
void *CPed::operator new(size_t sz) { return CPools::GetPedPool()->New(); }
@@ -4143,7 +4140,7 @@ CPed::SetGetUp(void)
&& ((CTimer::GetFrameCounter() + m_randomSeed % 256 + 5) % 8
|| CCollision::ProcessColModels(GetMatrix(), *CModelInfo::GetModelInfo(m_modelIndex)->GetColModel(),
collidingVeh->GetMatrix(), *CModelInfo::GetModelInfo(collidingVeh->m_modelIndex)->GetColModel(),
- &aTempPedColPts, nil, nil) > 0)) {
+ aTempPedColPts, nil, nil) > 0)) {
bGetUpAnimStarted = false;
if (IsPlayer())
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 2edd5d68..321d5bff 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -823,14 +823,14 @@ public:
}
// set by 0482:set_threat_reaction_range_multiplier opcode
- static uint16 &nThreatReactionRangeMultiplier;
+ static uint16 nThreatReactionRangeMultiplier;
// set by 0481:set_enter_car_range_multiplier opcode
- static uint16 &nEnterCarRangeMultiplier;
+ static uint16 nEnterCarRangeMultiplier;
- static bool &bNastyLimbsCheat;
- static bool &bPedCheat2;
- static bool &bPedCheat3;
+ static bool bNastyLimbsCheat;
+ static bool bPedCheat2;
+ static bool bPedCheat3;
static CVector2D ms_vec2DFleePosition;
#ifdef TOGGLEABLE_BETA_FEATURES
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 6959487f..e26e2eaf 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -47,36 +47,36 @@ const RegenerationPoint aSafeZones[] = {
CVector(-321.0f, -1043.0f, -13.2f), CVector(-328.0f, -1045.0f, -13.2f), CVector(-398.0f, -1044.0f, -13.5f), CVector(-390.0f, -1040.5f, -13.5f) },
{ LEVEL_COMMERCIAL, LEVEL_SUBURBAN, 425.0f, 280.0f, 471.0f, 447.0f, 20.0f, 5.0f,
CVector(-292.0f, -457.0f, -11.6f), CVector(-310.0f, -461.0f, -11.6f), CVector(-413.0f, -461.0f, -11.5f), CVector(-399.0f, -457.0f, -11.3f) }
-}; // *(RegenerationPoint(*)[8]) * (uintptr*)0x5FA578;
-
-PedGroup CPopulation::ms_pPedGroups[NUMPEDGROUPS]; // = *(PedGroup(*)[NUMPEDGROUPS]) * (uintptr*)0x6E9248;
-bool CPopulation::ms_bGivePedsWeapons; // = *(bool*)0x95CCF6;
-int32 CPopulation::m_AllRandomPedsThisType = -1; // = *(int32*)0x5FA570;
-float CPopulation::PedDensityMultiplier = 1.0f; // = *(float*)0x5FA56C;
-uint32 CPopulation::ms_nTotalMissionPeds; // = *(uint32*)0x8F5F70;
-int32 CPopulation::MaxNumberOfPedsInUse = 25; // *(int32*)0x5FA574;
-uint32 CPopulation::ms_nNumCivMale; // = *(uint32*)0x8F2548;
-uint32 CPopulation::ms_nNumCivFemale; // = *(uint32*)0x8F5F44;
-uint32 CPopulation::ms_nNumCop; // = *(uint32*)0x885AFC;
-bool CPopulation::bZoneChangeHasHappened; // = *(bool*)0x95CD79;
-uint32 CPopulation::ms_nNumEmergency; // = *(uint32*)0x94071C;
-int8 CPopulation::m_CountDownToPedsAtStart; // = *(int8*)0x95CD4F;
-uint32 CPopulation::ms_nNumGang1; // = *(uint32*)0x8F1B1C;
-uint32 CPopulation::ms_nNumGang2; // = *(uint32*)0x8F1B14;
-uint32 CPopulation::ms_nTotalPeds; // = *(uint32*)0x95CB50;
-uint32 CPopulation::ms_nNumGang3; // = *(uint32*)0x8F2548;
-uint32 CPopulation::ms_nTotalGangPeds; // = *(uint32*)0x885AF0;
-uint32 CPopulation::ms_nNumGang4; // = *(uint32*)0x8F1B2C;
-uint32 CPopulation::ms_nTotalCivPeds; // = *(uint32*)0x8F2C3C;
-uint32 CPopulation::ms_nNumGang5; // = *(uint32*)0x8F1B30;
-uint32 CPopulation::ms_nNumDummy; // = *(uint32*)0x8F1A98;
-uint32 CPopulation::ms_nNumGang6; // = *(uint32*)0x8F1B20;
-uint32 CPopulation::ms_nNumGang9; // = *(uint32*)0x8F1B10;
-uint32 CPopulation::ms_nNumGang7; // = *(uint32*)0x8F1B28;
-uint32 CPopulation::ms_nNumGang8; // = *(uint32*)0x8F1B0C;
-CVector CPopulation::RegenerationPoint_a; // = *(CVector*)0x8E2AA4;
-CVector CPopulation::RegenerationPoint_b; // = *(CVector*)0x8E2A98;
-CVector CPopulation::RegenerationForward; // = *(CVector*)0x8F1AD4;
+};
+
+PedGroup CPopulation::ms_pPedGroups[NUMPEDGROUPS];
+bool CPopulation::ms_bGivePedsWeapons;
+int32 CPopulation::m_AllRandomPedsThisType = -1;
+float CPopulation::PedDensityMultiplier = 1.0f;
+uint32 CPopulation::ms_nTotalMissionPeds;
+int32 CPopulation::MaxNumberOfPedsInUse = 25;
+uint32 CPopulation::ms_nNumCivMale;
+uint32 CPopulation::ms_nNumCivFemale;
+uint32 CPopulation::ms_nNumCop;
+bool CPopulation::bZoneChangeHasHappened;
+uint32 CPopulation::ms_nNumEmergency;
+int8 CPopulation::m_CountDownToPedsAtStart;
+uint32 CPopulation::ms_nNumGang1;
+uint32 CPopulation::ms_nNumGang2;
+uint32 CPopulation::ms_nTotalPeds;
+uint32 CPopulation::ms_nNumGang3;
+uint32 CPopulation::ms_nTotalGangPeds;
+uint32 CPopulation::ms_nNumGang4;
+uint32 CPopulation::ms_nTotalCivPeds;
+uint32 CPopulation::ms_nNumGang5;
+uint32 CPopulation::ms_nNumDummy;
+uint32 CPopulation::ms_nNumGang6;
+uint32 CPopulation::ms_nNumGang9;
+uint32 CPopulation::ms_nNumGang7;
+uint32 CPopulation::ms_nNumGang8;
+CVector CPopulation::RegenerationPoint_a;
+CVector CPopulation::RegenerationPoint_b;
+CVector CPopulation::RegenerationForward;
void
CPopulation::Initialise()