summaryrefslogtreecommitdiffstats
path: root/src/control/PathFind.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-03 15:16:31 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-03 16:01:11 +0200
commit5dc410a999f02f1e90c991c9de617bb2b1dc6bbc (patch)
tree4ad32e600c365326d721db8d3d6359e7b4d7f00d /src/control/PathFind.cpp
parentget rid of III code (diff)
downloadre3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.gz
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.bz2
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.lz
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.xz
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.tar.zst
re3-5dc410a999f02f1e90c991c9de617bb2b1dc6bbc.zip
Diffstat (limited to '')
-rw-r--r--src/control/PathFind.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index 4a948032..0dd9359c 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -23,7 +23,6 @@ CPathFind ThePaths;
#define NUMDETACHED_PEDS 1214
#define NUMTEMPEXTERNALNODES 4600
-
CPathInfoForObject *InfoForTileCars;
CPathInfoForObject *InfoForTilePeds;
@@ -1861,6 +1860,15 @@ CPathFind::DisplayPathData(void)
}
}
+CVector
+CPathFind::TakeWidthIntoAccountForWandering(CPathNode* nextNode, uint16 random)
+{
+ CVector pos = nextNode->GetPosition();
+ float newX = (nextNode->GetPedNodeWidth() * ((random % 16) - 7)) + pos.x;
+ float newY = (nextNode->GetPedNodeWidth() * (((random / 16) % 16) - 7)) + pos.y;
+ return CVector(newX, newY, pos.z);
+}
+
CPathNode*
CPathFind::GetNode(int16 index)
{