From 4d3f4065465614c3fe1c7c95cbbb08a01beffd31 Mon Sep 17 00:00:00 2001 From: Krom Stern Date: Wed, 16 Dec 2015 19:28:27 +0300 Subject: [PATCH] Fix as discussed in PR#111 Typo fix --- DetourCrowd/Source/DetourObstacleAvoidance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DetourCrowd/Source/DetourObstacleAvoidance.cpp b/DetourCrowd/Source/DetourObstacleAvoidance.cpp index f098272..3b2ff2c 100644 --- a/DetourCrowd/Source/DetourObstacleAvoidance.cpp +++ b/DetourCrowd/Source/DetourObstacleAvoidance.cpp @@ -547,8 +547,8 @@ int dtObstacleAvoidanceQuery::sampleVelocityAdaptive(const float* pos, const flo for (int j = 0; j < nr; ++j) { const float r = (float)(nr-j)/(float)nr; - pat[npat*2+0] = ddir[(j%1)*3] * r; - pat[npat*2+1] = ddir[(j%1)*3+2] * r; + pat[npat*2+0] = ddir[(j%2)*3] * r; + pat[npat*2+1] = ddir[(j%2)*3+2] * r; float* last1 = pat + npat*2; float* last2 = last1; npat++;