#define BP_NEIGHBORS 6 /* max number of neighbors */
struct bestp {
- int sctcache_hits;
- int sctcache_misses;
int bp_mobtype;
struct as_data *adp;
};
/*
* Find the best path from sector to to sector, and put the Empire movement
* string in path. Return 0 on success, -1 on error.
+ * FIXME unsafe by design: assumes path[] has space; buffer overrun
+ * when path gets long!
*/
static int
best_path(struct sctstr *from, struct sctstr *to, char *path, int mob_type)
#ifdef AS_STATS
as_stats(adp, stderr);
+ fprintf(stderr, "neighbor cache %zu bytes\n",
+ WORLD_SZ() * 6 * sizeof(struct sctstr *));
#endif /* AS_STATS */
-#ifdef BP_STATS
- fprintf(stderr, "best path %s\n", path);
- fprintf(stderr, "cache hits/misses: %d/%d\n",
- bp->sctcache_hits, bp->sctcache_misses);
-#endif /* BP_STATS */
return 0;
}