summaryrefslogtreecommitdiffstats
path: root/src/control/PathFind.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/PathFind.cpp7
1 files changed, 7 insertions, 0 deletions
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)
{