Fix new game guard 3 (#6126)
Closes#6126
See merge request OpenMW/openmw!976
(cherry picked from commit 89ca56632c6bc37f07e430e7f5cd23d855610b19)
a3942a1e Remove redundant check for y coordinate in inRange function
cc08a45c Move include where it is needed
7e1630a7 Remove redundant getPolyHeight wrapper
793c30ab Check dtNavMeshQuery::getPolyHeight status
a54c4bc2 Check dtNavMeshQuery::findStraightPath status
94e460ba Use proper check for distance
5624fe19 Consider path not found when there is navmesh query error
Validate almost straight shortcuts by navmesh raycast (#6102)
Closes#6102
See merge request OpenMW/openmw!947
(cherry picked from commit 9c3117d2d4a70475b021f4e4a50eec88cd7cf125)
e7d68d3d Validate almost straight shortcuts by navmesh raycast
Reapply new game guard fix
See merge request OpenMW/openmw!944
(cherry picked from commit eca0a95a5a16cf3734a32c76cab0c0a0dd6dfe2d)
56e63053 Revert "Merge branch 'fix_new_game_guard' into 'master'"
e5e04b85 Consider time to destination when try to avoid collision
Minor optimization in aicombat.cpp
See merge request OpenMW/openmw!737
(cherry picked from commit f1d19035cccfff2523faad0d4e4d96cd3ddae2e6)
bbbfc520 Minor optimization in aicombat.cpp
237b34a6 Fix style
a14911cb Fix indentation
Division by zero causes float value to be infinite. When infinite cost is
multiplied by zero distance the result is NaN. After this pathfinding algorithm
state is broken.
For actors with big bounding box given constants may not work properly like
it's not possible to get close enough to actor from a given angle to make it
move.
When distance between start and end point is greater than max radius of area
possibly covered by navmesh there is no way to find path via navmesh. Also if
distance is greater than cell size navmesh might not exists withing mentioned
area because cell is not loaded therefore navmesh is not generated. So minumum
of these values is used to limit max path distance. Assuming that path
actually exists it's possible to build path to the edge of a circle. When
actor reaches initial edge path is built further. However it will not be
optimal.