worked on nav-mesh
added dijkstra support for nav mesh some minor changes to distributions minor fixes
This commit is contained in:
@@ -68,13 +68,13 @@ namespace NM {
|
||||
re.location = pwalk.end;
|
||||
|
||||
|
||||
for (int i = 0; i < 25; ++i) {
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
|
||||
const float distance = params.getToBeWalkedDistance() * dDist.draw();
|
||||
const Heading head = params.heading + dHead.draw();
|
||||
|
||||
// only forward!
|
||||
if (distance < 0.01) {continue;}
|
||||
if (distance < 0.01) {--i; continue;}
|
||||
|
||||
// get the to-be-reached destination's position (using start+distance+heading)
|
||||
const Point2 dir = head.asVector();
|
||||
@@ -123,7 +123,7 @@ namespace NM {
|
||||
const Heading head = params.heading + dHead.draw();
|
||||
|
||||
// only forward!
|
||||
if (distance < 0.01) {continue;}
|
||||
if (distance < 0.01) {--i; continue;}
|
||||
|
||||
// get the to-be-reached destination's position (using start+distance+heading)
|
||||
const Point2 dir = head.asVector();
|
||||
|
||||
Reference in New Issue
Block a user