diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-10-13 13:46:09 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-10-13 13:46:09 +0200 |
commit | 8eda735918a7639e1ffd74f945b8783555c5c35a (patch) | |
tree | 5eee29e7f539a57d2e29da8eee232a47163ae132 /src/peds | |
parent | Merge branch 'master' into script_dev (diff) | |
download | re3-8eda735918a7639e1ffd74f945b8783555c5c35a.tar re3-8eda735918a7639e1ffd74f945b8783555c5c35a.tar.gz re3-8eda735918a7639e1ffd74f945b8783555c5c35a.tar.bz2 re3-8eda735918a7639e1ffd74f945b8783555c5c35a.tar.lz re3-8eda735918a7639e1ffd74f945b8783555c5c35a.tar.xz re3-8eda735918a7639e1ffd74f945b8783555c5c35a.tar.zst re3-8eda735918a7639e1ffd74f945b8783555c5c35a.zip |
Diffstat (limited to 'src/peds')
-rw-r--r-- | src/peds/PedRoutes.cpp | 18 | ||||
-rw-r--r-- | src/peds/PedRoutes.h | 1 |
2 files changed, 18 insertions, 1 deletions
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 |