respect pathTo flags when sending a new point
[
[
[
[
[
[
DESCRIBE IN LAYMAN'S TERMS WHAT YOUR MERGE REQUEST IS MEANT TO ACCOMPLISH HERE
This is a pretty core change, which always makes me nervous. But what follows is a tale of woe and a happy ending
-
lua_baseentity
has a functionpathTo
which let's you force a path point. It clears all other paths in the queue and if you set the "scripted" flag it follows that path until completion.- Wulgaru is a good example of a mob that uses this
- At some point it worked as expected, but unsure when as the core functionality of
pathfind.cpp
's functionpathTo
clears after setting flags for the new point, essentially ignoring the flags and lettingmob_controller
Move()
function send the mob to the player if they are out of melee range. - This MR removes that second, erroneous
clear()
call (it's called above in the same function, before recording thepathFlags
- This MR also adjusts the lua
isMobFollowingPath()
function to allow passing a number (any number) to returnisFollowingScriptedPath()
, to help diagnose things if this change breaks things (as core changes like this can sometimes do)
Provide a "patch note" for your merge request here. This patch note will be directly copy and pasted into the #patch-notes section of the Wings Discord when this content is patched to the live server. Make sure to include whatever in-game name you would like people to see in parenthesis after the patch note.
- Scripted paths for mobs should now work as they should (MowFord)