summaryrefslogtreecommitdiffstats
path: root/src/peds/PedRoutes.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2019-10-16 22:42:31 +0200
committerGitHub <noreply@github.com>2019-10-16 22:42:31 +0200
commit2c81844c20e41079b8d654a4bd06c62e6cd160ea (patch)
tree0d4061ef678cf2bb73bc634128f19878e14c9608 /src/peds/PedRoutes.cpp
parentMerge pull request #245 from erorcun/erorcun (diff)
parentMerge branch 'master' into master (diff)
downloadre3-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/PedRoutes.cpp')
-rw-r--r--src/peds/PedRoutes.cpp18
1 files changed, 17 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;
+}