mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Fixed usage of 2D vector array
This commit is contained in:
parent
d29454b44d
commit
096692fec8
1 changed files with 2 additions and 2 deletions
|
@ -167,7 +167,7 @@ PathInfo *PathSearch::GeneratePath(PathInfo *path)
|
|||
VectorCopy2D(path_startdir, current_path->dir);
|
||||
current_path->dist = Node->g;
|
||||
} else {
|
||||
VectorCopy(path_totaldir, current_path->dir);
|
||||
VectorCopy2D(path_totaldir, current_path->dir);
|
||||
path->dist = Node->h;
|
||||
}
|
||||
|
||||
|
@ -754,7 +754,7 @@ int PathSearch::FindPathAway(
|
|||
|
||||
VectorSub2D(pathway->pos2, avoid, dir);
|
||||
NewNode->h = VectorNormalize2D(dir);
|
||||
NewNode->h += fBias - DotProduct(dir, vPreferredDir);
|
||||
NewNode->h += fBias - DotProduct2D(dir, vPreferredDir);
|
||||
|
||||
f = (int)((float)g + NewNode->h);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue