From 5dc410a999f02f1e90c991c9de617bb2b1dc6bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Wed, 3 Jun 2020 16:16:31 +0300 Subject: Peds, eSound and PedState enum, fixes --- src/control/PathFind.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/control/PathFind.cpp') 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) { -- cgit v1.2.3