aicombat pathfinding workaround

Sorry, a bit of mess with the branching and merging.  The only useful commit here is the commit d470aba, hopefully you can cherry pick the two files aicombat.cpp and pathfinding.cpp.