Compile-time option to use A* for distribution

Just for benchmarking.
This commit is contained in:
Markus Armbruster 2011-03-05 16:05:26 +01:00
parent 78d7db3baf
commit b5b3a7b1ef

View file

@ -188,9 +188,15 @@ assemble_dist_paths(double *import_cost)
if (sp->sct_own != dist->sct_own) if (sp->sct_own != dist->sct_own)
continue; continue;
#ifdef DIST_PATH_NO_REUSE #ifdef DIST_PATH_NO_REUSE
#if DIST_PATH_NO_REUSE == 1
import_cost[uid] = path_find(sp->sct_dist_x, sp->sct_dist_y, import_cost[uid] = path_find(sp->sct_dist_x, sp->sct_dist_y,
sp->sct_x, sp->sct_y, dist->sct_own, sp->sct_x, sp->sct_y, dist->sct_own,
MOB_MOVE); MOB_MOVE);
#else
path_find_from(sp->sct_dist_x, sp->sct_dist_y,
dist->sct_own, MOB_MOVE);
import_cost[uid] = path_find_to(sp->sct_x, sp->sct_y);
#endif
#else #else
if (sp->sct_dist_x != dx || sp->sct_dist_y != dy) { if (sp->sct_dist_x != dx || sp->sct_dist_y != dy) {
dx = sp->sct_dist_x; dx = sp->sct_dist_x;