From ad958235cfc56b86da89bdc2aa1e5155b0c006a1 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 23 Jan 2014 19:35:01 +0100 Subject: Replaced some of the hardcoded values with constants (map) - Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru --- src/map/unit.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/map/unit.h') diff --git a/src/map/unit.h b/src/map/unit.h index 881fa16f4..d434d52e4 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -13,6 +13,19 @@ struct map_session_data; struct block_list; +/** + * Bitmask values usable as a flag in unit_stopwalking + */ +enum unit_stopwalking_flag { + STOPWALKING_FLAG_NONE = 0x00, + STOPWALKING_FLAG_FIXPOS = 0x01, ///< Issue a fixpos packet afterwards + STOPWALKING_FLAG_ONESTEP = 0x02, ///< Force the unit to move one cell if it hasn't yet + STOPWALKING_FLAG_NEXTCELL = 0x04, ///< Enable moving to the next cell when unit was already half-way there + /// (may cause on-touch/place side-effects, such as a scripted map change) + STOPWALKING_FLAG_MASK = 0xff, ///< Mask all of the above + // Note: Upper bytes are reserved for duration. +}; + struct unit_data { struct block_list *bl; struct walkpath_data walkpath; -- cgit v1.2.3-60-g2f50