From d5a6e17079ab87b946132155bbe37bd20e27c239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Tue, 17 Mar 2020 21:03:13 +0300 Subject: ProcessButtonPresses and fixes --- src/peds/Population.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/peds/Population.cpp') diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 496ece34..bb5ec475 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -30,7 +30,8 @@ // More clearly they're transition areas between zones. RegenerationPoint (&aSafeZones)[8] = *(RegenerationPoint(*)[8]) * (uintptr*)0x5FA578; -PedGroup (&CPopulation::ms_pPedGroups)[NUMPEDGROUPS] = *(PedGroup(*)[NUMPEDGROUPS]) * (uintptr*)0x6E9248; +//PedGroup (&CPopulation::ms_pPedGroups)[NUMPEDGROUPS] = *(PedGroup(*)[NUMPEDGROUPS]) * (uintptr*)0x6E9248; +PedGroup CPopulation::ms_pPedGroups[NUMPEDGROUPS]; bool &CPopulation::ms_bGivePedsWeapons = *(bool*)0x95CCF6; int32 &CPopulation::m_AllRandomPedsThisType = *(int32*)0x5FA570; float &CPopulation::PedDensityMultiplier = *(float*)0x5FA56C; @@ -80,7 +81,7 @@ CPopulation::Initialise() ms_nNumDummy = 0; m_AllRandomPedsThisType = -1; - PedDensityMultiplier = 1.0; + PedDensityMultiplier = 1.0f; bZoneChangeHasHappened = false; m_CountDownToPedsAtStart = 2; @@ -511,9 +512,9 @@ CPopulation::AddPed(ePedType pedType, uint32 miOrCopType, CVector const &coors) uint32 weapon; if (CGeneral::GetRandomNumberInRange(0, 100) >= 50) - weapon = ped->GiveWeapon(CGangs::GetGangWeapon2(pedType - PEDTYPE_GANG1), 25001); + weapon = ped->GiveWeapon(CGangs::GetGangInfo(pedType - PEDTYPE_GANG1)->m_Weapon2, 25001); else - weapon = ped->GiveWeapon(CGangs::GetGangWeapon1(pedType - PEDTYPE_GANG1), 25001); + weapon = ped->GiveWeapon(CGangs::GetGangInfo(pedType - PEDTYPE_GANG1)->m_Weapon1, 25001); ped->SetCurrentWeapon(weapon); return ped; } @@ -770,7 +771,7 @@ CPopulation::AddPedInCar(CVehicle* car) // fall through default: - int gangOfPed = GANG_MAFIA; + int gangOfPed = 0; imSureThatModelIsLoaded = false; while (gangOfPed < NUM_GANGS && CGangs::GetGangInfo(gangOfPed)->m_nVehicleMI != car->m_modelIndex) -- cgit v1.2.3