According to BigFoot GetPathingDistance() will be influenced by enemies blocking the path. It is unsuited for evaluating the real shortest distance when not called at game start.
Therefore I calculate all distances from bases to bases and bases to strategy points at gamestart and write them to a table. Afterwards access to GetShortestPathingDistance(), my substitution function is a) correct and b) faster and c) it will allow to locate those strategy points unaccessable on foot which have to be caped by jumpers for t&h.
I also added a small random deviation (0 - 100) for FindClosestEnemyPlayer() so the AI won't always choose enemy A (distance 480) while B (distance 500) isn't much more distant.
You find the code at top of this thread.
Edited by LarkinVB, 02 March 2005 - 08:03 AM.