Some changes to make the AI pathing work better. The AI gets stuck far, far less often on this PR.
The changes here:
Give the AI a bigger jetpack buff. This isn't necessarily a fix, but various other balance changes have meant that the AI is incapable of jetpacking up ledges that the player is capable of. This just about evens it out. In future, I'd like to improve the AI waypoint following and/or pathfinding so we can reduce this buff, but for now this'll do.
Revert the AI stuck behaviour to the old behaviour. There was a commit that reset the stuck timer when the AI tries getting unstuck, however this appears to have been a regression and led to the AI not changing it's movement in the majority of cases. Changing it back makes the AI far, far less likely to get stuck for long periods of time.
Slightly increase the threshold to be considered unstuck. There's an edge case on certain geometry where the AI will get it's head stuck, and the rocking of its legs will lead to the torso shifting, which just about leads to the AI thinking it's not stuck. This makes this less likely. In future, I'd like to do something smarter (consider the velocity from more than just 2 frames), but this is a quick fix for most cases.
Improve the AI prone detection. Seems the AI sometimes triggers false positives when the path is diagonal, and the AI will crawl and get stuck. This CR changes the threshold from when the AI will allow going prone from a 45 degree climb to only a 30 degree climb.
Improve unstuck logic to try swapping whether the AI is prone/standing too, which can help when the prone detection logic makes a bad choice.
I'd like to make some further improvements, but they'll likely need to wait until I have a bit more time:
Improve AI pathing so that if moving vertically up/down, it prefers a little bit of distance from the object if possible. Right now the AI tends to bash it's head on the ceiling because it cuts things a little too close. There's some waypoint-following hacks to try to resolve this, but it'd likely best be enhanced in the C++ pathing code itself.
Some changes to make the AI pathing work better. The AI gets stuck far, far less often on this PR.
The changes here:
I'd like to make some further improvements, but they'll likely need to wait until I have a bit more time: