diff options
author | Haru <haru@dotalux.com> | 2014-01-23 19:35:01 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-06-01 10:11:40 +0200 |
commit | ad958235cfc56b86da89bdc2aa1e5155b0c006a1 (patch) | |
tree | 8b5d66a4620d28edeeefae1aec67881b98ac0530 /src/map/unit.h | |
parent | 42e1df9e61f8efb6340ed1c9238cd247d553d9b8 (diff) | |
download | hercules-ad958235cfc56b86da89bdc2aa1e5155b0c006a1.tar.gz hercules-ad958235cfc56b86da89bdc2aa1e5155b0c006a1.tar.bz2 hercules-ad958235cfc56b86da89bdc2aa1e5155b0c006a1.tar.xz hercules-ad958235cfc56b86da89bdc2aa1e5155b0c006a1.zip |
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 <haru@dotalux.com>
Diffstat (limited to 'src/map/unit.h')
-rw-r--r-- | src/map/unit.h | 13 |
1 files changed, 13 insertions, 0 deletions
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; |