diff options
author | skyleo <skyleo@skyleo.de> | 2019-09-08 02:53:24 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2020-03-08 20:56:27 +0100 |
commit | d13b24a62ac933364839c7ece1f70eba001e7c2d (patch) | |
tree | c10d9f953cf017579a22c9d58b9fc74fefc2956e /src/map/clif.c | |
parent | feb1f9d96a9cfc12602c96235106397b67f2aeb4 (diff) | |
download | hercules-d13b24a62ac933364839c7ece1f70eba001e7c2d.tar.gz hercules-d13b24a62ac933364839c7ece1f70eba001e7c2d.tar.bz2 hercules-d13b24a62ac933364839c7ece1f70eba001e7c2d.tar.xz hercules-d13b24a62ac933364839c7ece1f70eba001e7c2d.zip |
Refactor code using directions to use enum unit_dir
This removes a lot of duplicated code, especially related to people not using the arrays dirx and diry.
Assertions for whenever these arrays are used have been added as well, to ensure valid index range.
Some trailing white space has been removed as well.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 3022d7f69..a0ffeac32 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11348,15 +11348,7 @@ static void clif_parse_MapMove(int fd, struct map_session_data *sd) /// 0 = straight /// 1 = turned CW /// 2 = turned CCW -/// dir: -/// 0 = north -/// 1 = northwest -/// 2 = west -/// 3 = southwest -/// 4 = south -/// 5 = southeast -/// 6 = east -/// 7 = northeast +/// dir: @see enum unit_dir static void clif_changed_dir(struct block_list *bl, enum send_target target) { unsigned char buf[64]; |