server/src/kernel/pathfinder.h
Enno Rehling b06f3cf0e2 Bug 2684 Astraler Blick
Old implementation was bad, using set_observer is better. Still missing a test, but improved the one for sp_viewreality, which is almost doing the same thing - adaptation should be easy.

Fixes https://bugs.eressea.de/view.php?id=2684
2020-08-16 16:00:28 +02:00

22 lines
850 B
C

#ifndef H_KRNL_PATHFINDER
#define H_KRNL_PATHFINDER
#ifdef __cplusplus
extern "C" {
#endif
extern struct region **path_find(struct region *handle_start,
const struct region *target, int maxlen,
bool(*allowed) (const struct region *, const struct region *));
extern bool path_exists(struct region *handle_start, const struct region *target,
int maxlen, bool(*allowed) (const struct region *, const struct region *));
extern bool allowed_fly(const struct region *src, const struct region *target);
extern bool allowed_walk(const struct region *src, const struct region *target);
extern struct selist *path_regions_in_range(struct region *src, int maxdist,
bool(*allowed) (const struct region *, const struct region *));
extern void pathfinder_cleanup(void);
#ifdef __cplusplus
}
#endif
#endif