Since pathAdd is a function that will clearly need adjustments, I think I'd set a debugger breakpoint there to see what exactly is going wrong. Here's the bulk of that function (NB - the K-Mod version on Erik's pathfinder branch looks quite a bit different):I am not really getting a hold of the "pathfinding".
Could you give me some hints how to adapt it?
Never really worked on pathfinding in the past. [...]
The iStartMoves == 0 conditional (i.e. when movement points are already exhausted before adding the current step to the path) may have to handle iStartMoves < 0 as well. And the min/ max stuff and assertion at the end probably need to be changed too. Further changes may be needed in other pathfinding functions, but addressing these issues would be a start.