summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c19
1 files 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;