mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-05 18:49:40 +00:00
Merge branch 'fix_pathgrid_path' into 'master'
Use pathgrid path when destination is closer to different graph component node See merge request OpenMW/openmw!1155 (cherry picked from commit 4bf22f3ca0e5e5776c09cb8d5ad9793986373975) 9112c65a Use pathgrid path when destination is closer to different graph component node
This commit is contained in:
parent
ec4e3b04a7
commit
ad703d7470
1 changed files with 2 additions and 4 deletions
|
@ -206,9 +206,6 @@ namespace MWMechanics
|
|||
endPointInLocalCoords,
|
||||
startNode);
|
||||
|
||||
if (!endNode.second)
|
||||
return;
|
||||
|
||||
// if it's shorter for actor to travel from start to end, than to travel from either
|
||||
// start or end to nearest pathgrid point, just travel from start to end.
|
||||
float startToEndLength2 = (endPointInLocalCoords - startPointInLocalCoords).length2();
|
||||
|
@ -279,7 +276,8 @@ namespace MWMechanics
|
|||
// unreachable pathgrid point.
|
||||
//
|
||||
// The AI routines will have to deal with such situations.
|
||||
*out++ = endPoint;
|
||||
if (endNode.second)
|
||||
*out++ = endPoint;
|
||||
}
|
||||
|
||||
float PathFinder::getZAngleToNext(float x, float y) const
|
||||
|
|
Loading…
Reference in a new issue