diff options
author | erorcun <erayorcunus@gmail.com> | 2020-06-03 16:06:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 16:06:07 +0200 |
commit | 1e2b087601747c5031f48badf016c768b032976e (patch) | |
tree | 4ad32e600c365326d721db8d3d6359e7b4d7f00d /src/control/PathFind.cpp | |
parent | get rid of III code (diff) | |
parent | Peds, eSound and PedState enum, fixes (diff) | |
download | re3-1e2b087601747c5031f48badf016c768b032976e.tar re3-1e2b087601747c5031f48badf016c768b032976e.tar.gz re3-1e2b087601747c5031f48badf016c768b032976e.tar.bz2 re3-1e2b087601747c5031f48badf016c768b032976e.tar.lz re3-1e2b087601747c5031f48badf016c768b032976e.tar.xz re3-1e2b087601747c5031f48badf016c768b032976e.tar.zst re3-1e2b087601747c5031f48badf016c768b032976e.zip |
Diffstat (limited to 'src/control/PathFind.cpp')
-rw-r--r-- | src/control/PathFind.cpp | 10 |
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) { |