diff options
author | aap <aap@papnet.eu> | 2019-06-19 14:06:13 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-06-19 14:06:13 +0200 |
commit | 78e33785ecfd176616b1a1b1588c771b978a4c19 (patch) | |
tree | 6abde4ca51c0f477ce63288215b510a462e52e50 /src/control/PedType.cpp | |
parent | Merge pull request #22 from erorcun/master (diff) | |
download | re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.gz re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.bz2 re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.lz re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.xz re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.zst re3-78e33785ecfd176616b1a1b1588c771b978a4c19.zip |
Diffstat (limited to 'src/control/PedType.cpp')
-rw-r--r-- | src/control/PedType.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/control/PedType.cpp b/src/control/PedType.cpp index b6d77cb0..645ab15c 100644 --- a/src/control/PedType.cpp +++ b/src/control/PedType.cpp @@ -2,25 +2,27 @@ #include "patcher.h" #include "PedType.h" -CPedType* (&CPedType::ms_apPedType)[23] = *(CPedType * (*)[23]) * (int*)0x941594; +CPedType *(&CPedType::ms_apPedType)[NUM_PEDTYPES] = *(CPedType *(*)[NUM_PEDTYPES]) *(int*)0x941594; WRAPPER void CPedType::LoadPedData(void) { EAXJMP(0x4EE8D0); } -WRAPPER int32 CPedType::FindPedType(char* type) { EAXJMP(0x4EEC10); } +WRAPPER int32 CPedType::FindPedType(char *type) { EAXJMP(0x4EEC10); } void -CPedType::Initialise() +CPedType::Initialise(void) { + int i; + debug("Initialising CPedType...\n"); - for (int i = 0; i < 23; i++) { + for(i = 0; i < NUM_PEDTYPES; i++){ ms_apPedType[i] = new CPedType; - ms_apPedType[i]->m_Type.IntValue = 1; + ms_apPedType[i]->m_flag = PED_FLAG_PLAYER1; ms_apPedType[i]->field_4 = 0; ms_apPedType[i]->field_8 = 0; // Why field_C not initialized? ms_apPedType[i]->field_10 = 0; ms_apPedType[i]->field_14 = 0; - ms_apPedType[i]->m_Threat.IntValue = 0; - ms_apPedType[i]->m_Avoid.IntValue = 0; + ms_apPedType[i]->m_threats = 0; + ms_apPedType[i]->m_avoid = 0; } debug("Loading ped data...\n"); LoadPedData(); @@ -29,4 +31,4 @@ CPedType::Initialise() STARTPATCHES InjectHook(0x4EE7E0, &CPedType::Initialise, PATCH_JUMP); -ENDPATCHES
\ No newline at end of file +ENDPATCHES |