From a5d6c952a7be243a4c20b6aad47116dce0e51625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 27 Sep 2020 02:36:49 +0300 Subject: Credits & fixes --- src/control/PathFind.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/control/PathFind.cpp') diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp index f8bc2df6..81d87b05 100644 --- a/src/control/PathFind.cpp +++ b/src/control/PathFind.cpp @@ -1869,6 +1869,13 @@ CPathFind::TakeWidthIntoAccountForWandering(CPathNode* nextNode, uint16 random) return CVector(newX, newY, pos.z); } +void +CPathFind::TakeWidthIntoAccountForCoors(CPathNode* node1, CPathNode* node2, uint16 random, float* x, float* y) +{ + *x += (Min(node1->width, node2->width) * ((random % 16) - 7)); + *y += (Min(node1->width, node2->width) * (((random / 16) % 16) - 7)); +} + CPathNode* CPathFind::GetNode(int16 index) { -- cgit v1.2.3