summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-03-23 00:34:41 +0100
committerGitHub <noreply@github.com>2020-03-23 00:34:41 +0100
commit4070cad4a746728f0282862aa0a0063c15bbc86e (patch)
treefd780f1f980c6d2036f8b57c32f75e203c7b39a8 /src/peds
parentFix order of math operations on integers (fires) (diff)
parentmerge with upstream (diff)
downloadre3-4070cad4a746728f0282862aa0a0063c15bbc86e.tar
re3-4070cad4a746728f0282862aa0a0063c15bbc86e.tar.gz
re3-4070cad4a746728f0282862aa0a0063c15bbc86e.tar.bz2
re3-4070cad4a746728f0282862aa0a0063c15bbc86e.tar.lz
re3-4070cad4a746728f0282862aa0a0063c15bbc86e.tar.xz
re3-4070cad4a746728f0282862aa0a0063c15bbc86e.tar.zst
re3-4070cad4a746728f0282862aa0a0063c15bbc86e.zip
Diffstat (limited to '')
-rw-r--r--src/peds/PedRoutes.cpp9
-rw-r--r--src/peds/PedRoutes.h3
2 files changed, 11 insertions, 1 deletions
diff --git a/src/peds/PedRoutes.cpp b/src/peds/PedRoutes.cpp
index 9b7dafd4..3bc17002 100644
--- a/src/peds/PedRoutes.cpp
+++ b/src/peds/PedRoutes.cpp
@@ -5,6 +5,15 @@
CRouteNode (&gaRoutes)[NUMPEDROUTES] = *(CRouteNode(*)[NUMPEDROUTES]) * (uintptr*)0x62E090;
+void
+CRouteNode::Initialise()
+{
+ for (int i = 0; i < NUMPEDROUTES; i++) {
+ gaRoutes[i].m_route = -1;
+ gaRoutes[i].m_pos = CVector(0.0f, 0.0f, 0.0f);
+ }
+}
+
int16
CRouteNode::GetRouteThisPointIsOn(int16 point)
{
diff --git a/src/peds/PedRoutes.h b/src/peds/PedRoutes.h
index d313938a..c478e38d 100644
--- a/src/peds/PedRoutes.h
+++ b/src/peds/PedRoutes.h
@@ -11,4 +11,5 @@ public:
static int16 GetRouteStart(int16);
static void AddRoutePoint(int16, CVector);
static void RemoveRoute(int16);
-}; \ No newline at end of file
+ static void Initialise(void);
+};