From 7879d7be752fe7488c8d1653b0ca88e6574b9e4a Mon Sep 17 00:00:00 2001 From: skyleo Date: Wed, 2 Oct 2019 23:58:30 +0200 Subject: Add documentation for unit->walktoxy --- src/map/unit.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/map/unit.c b/src/map/unit.c index c67a7e919..3a1f2a9f9 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -514,12 +514,19 @@ static int unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) return 0; } -//flag parameter: -//&1 -> 1/0 = easy/hard -//&2 -> force walking -//&4 -> Delay walking if the reason you can't walk is the canwalk delay -//&8 -> Search for an unoccupied cell and cancel if none available -//@return 0: success, 1: failure +/** + * Makes a unit walk to (x, y) coordinates + * @param bl: block_list of unit to move + * @param x: x-coordinate + * @param y: y-coordinate + * @param flag: flag paramater with following options: + * - `& 1` -> 1/0 = easy / hard + * - `& 2` -> Force walking + * - `& 4` -> Delay walking, if the reason you can't walk is the `canwalk delay` + * - `& 8` -> Search for an unoccupied cell and cancel if none available + * . + * @return 0: success, 1: failure + */ static int unit_walktoxy(struct block_list *bl, short x, short y, int flag) { struct unit_data* ud = NULL; -- cgit v1.2.3-60-g2f50