diff options
author | erorcun <erayorcunus@gmail.com> | 2019-10-16 22:42:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 22:42:31 +0200 |
commit | 2c81844c20e41079b8d654a4bd06c62e6cd160ea (patch) | |
tree | 0d4061ef678cf2bb73bc634128f19878e14c9608 /src/peds | |
parent | Merge pull request #245 from erorcun/erorcun (diff) | |
parent | Merge branch 'master' into master (diff) | |
download | re3-2c81844c20e41079b8d654a4bd06c62e6cd160ea.tar re3-2c81844c20e41079b8d654a4bd06c62e6cd160ea.tar.gz re3-2c81844c20e41079b8d654a4bd06c62e6cd160ea.tar.bz2 re3-2c81844c20e41079b8d654a4bd06c62e6cd160ea.tar.lz re3-2c81844c20e41079b8d654a4bd06c62e6cd160ea.tar.xz re3-2c81844c20e41079b8d654a4bd06c62e6cd160ea.tar.zst re3-2c81844c20e41079b8d654a4bd06c62e6cd160ea.zip |
Diffstat (limited to 'src/peds')
-rw-r--r-- | src/peds/Ped.cpp | 2 | ||||
-rw-r--r-- | src/peds/Ped.h | 2 | ||||
-rw-r--r-- | src/peds/PedRoutes.cpp | 18 | ||||
-rw-r--r-- | src/peds/PedRoutes.h | 1 |
4 files changed, 22 insertions, 1 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 9eec49ab..b0dc96cf 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -62,6 +62,8 @@ WRAPPER void CPed::UpdateFromLeader(void) { EAXJMP(0x4D8F30); } WRAPPER int CPed::ScanForThreats(void) { EAXJMP(0x4C5FE0); } WRAPPER void CPed::SetEnterCar_AllClear(CVehicle*, uint32, uint32) { EAXJMP(0x4E0A40); } WRAPPER bool CPed::WarpPedToNearEntityOffScreen(CEntity*) { EAXJMP(0x4E5570); } +WRAPPER void CPed::SetObjective(eObjective, CVector) { EAXJMP(0x4D8A90); } +WRAPPER void CPed::SetObjective(eObjective, CVector, float) { EAXJMP(0x4D8770); } #define FEET_OFFSET 1.04f diff --git a/src/peds/Ped.h b/src/peds/Ped.h index c1ac7cfd..7a0ade14 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -553,6 +553,8 @@ public: void SetObjective(eObjective, void*); void SetObjective(eObjective); void SetObjective(eObjective, int16, int16); + void SetObjective(eObjective, CVector); + void SetObjective(eObjective, CVector, float); void ClearChat(void); void InformMyGangOfAttack(CEntity*); void ReactToAttack(CEntity*); diff --git a/src/peds/PedRoutes.cpp b/src/peds/PedRoutes.cpp index a8e8d2ab..c2ec51e2 100644 --- a/src/peds/PedRoutes.cpp +++ b/src/peds/PedRoutes.cpp @@ -26,4 +26,20 @@ CVector CRouteNode::GetPointPosition(int16 point) { return gaRoutes[point].m_pos; -}
\ No newline at end of file +} + +void +CRouteNode::AddRoutePoint(int16 route, CVector pos) +{ + uint16 point; + for (point = 0; point < NUMPEDROUTES; point++) { + if (gaRoutes[point].m_route == -1) + break; + } +#ifdef FIX_BUGS + if (point == NUMPEDROUTES) + return; +#endif + gaRoutes[point].m_route = route; + gaRoutes[point].m_pos = pos; +} diff --git a/src/peds/PedRoutes.h b/src/peds/PedRoutes.h index 9df9a29d..ff4e6c89 100644 --- a/src/peds/PedRoutes.h +++ b/src/peds/PedRoutes.h @@ -9,4 +9,5 @@ public: static int16 GetRouteThisPointIsOn(int16); static CVector GetPointPosition(int16); static int16 GetRouteStart(int16); + static void AddRoutePoint(int16, CVector); };
\ No newline at end of file |