From 1337a9b6034570861a7cadaf5338d0cbb5b06255 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 16 Feb 2020 23:08:54 +0300 Subject: script 1000-1154 --- src/peds/PedType.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/peds') diff --git a/src/peds/PedType.h b/src/peds/PedType.h index 9d284318..797344ab 100644 --- a/src/peds/PedType.h +++ b/src/peds/PedType.h @@ -85,6 +85,9 @@ public: static uint32 GetFlag(int type) { return ms_apPedType[type]->m_flag; } static uint32 GetAvoid(int type) { return ms_apPedType[type]->m_avoid; } static uint32 GetThreats(int type) { return ms_apPedType[type]->m_threats; } + static void AddThreat(int type, int threat) { ms_apPedType[type]->m_threats |= threat; } + static void RemoveThreat(int type, int threat) { ms_apPedType[type]->m_threats &= ~threat; } + static bool IsThreat(int type, int threat) { return ms_apPedType[type]->m_threats & threat; } }; static_assert(sizeof(CPedType) == 0x20, "CPedType: error"); -- cgit v1.2.3 From a122d558a26b41041276ebf6580167d7675b7592 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 22 Feb 2020 15:53:41 +0300 Subject: merge + bug fix --- src/peds/Population.cpp | 2 ++ src/peds/Population.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/peds') diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index a168198b..a2dd5c38 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -16,6 +16,7 @@ #include "IniFile.h" #include "VisibilityPlugins.h" #include "PedPlacement.h" +#include "DummyObject.h" #define CREATION_DIST_MULT_TO_DIST 40.0f #define CREATION_RANGE 10.0f // Being added over the CREATION_DIST_MULT_TO_DIST. @@ -58,6 +59,7 @@ CVector &CPopulation::RegenerationForward = *(CVector*)0x8F1AD4; WRAPPER CPed *CPopulation::AddPedInCar(CVehicle *vehicle) { EAXJMP(0x4F5800); } WRAPPER void CPopulation::ManagePopulation(void) { EAXJMP(0x4F3B90); } WRAPPER void CPopulation::MoveCarsAndPedsOutOfAbandonedZones(void) { EAXJMP(0x4F5BE0); } +WRAPPER void CPopulation::ConvertToRealObject(CDummyObject* obj) { EAXJMP(0x4F45A0); } void CPopulation::Initialise() diff --git a/src/peds/Population.h b/src/peds/Population.h index d39fb209..f22926a0 100644 --- a/src/peds/Population.h +++ b/src/peds/Population.h @@ -6,6 +6,7 @@ class CPed; class CVehicle; +class CDummyObject; struct PedGroup { @@ -80,4 +81,5 @@ public: static void AddToPopulation(float, float, float, float); static void ManagePopulation(void); static void MoveCarsAndPedsOutOfAbandonedZones(void); + static void ConvertToRealObject(CDummyObject* obj); }; -- cgit v1.2.3