Improve pathfinding AI
According to testers the OpenMW pathfinding AI is even worse than in the original game.
The main reasons for this seem to be:
- A mechanism called "shortcutting" that ignores the pathgrid if a LOS-check to the destination succeeds. This does not work well and just ignores many types of obstacles. Perhaps this could be improved by casting the ray from the feet instead of head. Or get rid of it completely. Not sure if original MW is doing such a thing.
- The handling for NPCs getting stuck is basically nonexistent. Getting stuck is not preventable with the limited path grid information available in the game files, so it needs to be handled gracefully. Possible improvements: run into a random direction (according to Hrnchamd that's what the original game does), or attempt to return to a pathgrid point.
- It likes to run in circles occasionally.