summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-05-03 21:35:49 +0200
committerGitHub <noreply@github.com>2020-05-03 21:35:49 +0200
commit21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6 (patch)
treebc5690ee69f74b4cbf25342b69955d6e7bad2cce /src/map/map.c
parent5f47379d6f5bba08a41be2a4a2604d36d3bce37a (diff)
parentc6baa02f18075da2abffe532ce0c87483c36ad9d (diff)
downloadhercules-21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6.tar.gz
hercules-21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6.tar.bz2
hercules-21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6.tar.xz
hercules-21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6.zip
Merge pull request #2690 from Kenpachi2k13/operator_use_fix
Fix usage of *= operator
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/map.c b/src/map/map.c
index b2c9c77c3..40e66e4df 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1713,9 +1713,9 @@ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x,
tx = *x + dx;
ty = *y + dy;
if (unit_is_dir_or_opposite(dir, UNIT_DIR_SOUTHWEST))
- tx *= costrange / MOVE_COST;
+ tx = tx * costrange / MOVE_COST;
if (unit_is_dir_or_opposite(dir, UNIT_DIR_NORTHWEST))
- ty *= costrange / MOVE_COST;
+ ty = ty * costrange / MOVE_COST;
if (!map->count_oncell(m, tx, ty, type, flag) && map->getcell(m, bl, tx, ty, CELL_CHKPASS)) {
*x = tx;
*y = ty;
@@ -1724,9 +1724,9 @@ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x,
tx = *x + dx;
ty = *y + dy;
if (unit_is_dir_or_opposite(dir, UNIT_DIR_NORTHWEST))
- tx *= costrange / MOVE_COST;
+ tx = tx * costrange / MOVE_COST;
if (unit_is_dir_or_opposite(dir, UNIT_DIR_SOUTHWEST))
- ty *= costrange / MOVE_COST;
+ ty = ty * costrange / MOVE_COST;
if (!map->count_oncell(m, tx, ty, type, flag) && map->getcell(m, bl, tx, ty, CELL_CHKPASS)) {
*x = tx;
*y = ty;