summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2019-10-03 02:11:48 +0200
committerHaru <haru@dotalux.com>2020-03-08 20:59:34 +0100
commit665855f460eb454d028f9f81c6779539bef7e494 (patch)
tree5ba973f502053f5e3225854400cd560dc1b7e99d /src
parent193956af55b94852917fc236a431ae384bf78d84 (diff)
downloadhercules-665855f460eb454d028f9f81c6779539bef7e494.tar.gz
hercules-665855f460eb454d028f9f81c6779539bef7e494.tar.bz2
hercules-665855f460eb454d028f9f81c6779539bef7e494.tar.xz
hercules-665855f460eb454d028f9f81c6779539bef7e494.zip
Update Coding Style for unit->walktobl_sub
Diffstat (limited to 'src')
-rw-r--r--src/map/unit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 64a849384..bff75d6bd 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -625,12 +625,10 @@ static int unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data)
return 1;
if (ud->walktimer == INVALID_TIMER && ud->target == data) {
- if (DIFF_TICK(ud->canmove_tick, tick) > 0) //Keep waiting?
- timer->add(ud->canmove_tick+1, unit->walktobl_sub, id, data);
- else if (unit->can_move(bl)) {
- if (unit->walktoxy_sub(bl) == 0)
- set_mobstate(bl, ud->state.attack_continue);
- }
+ if (DIFF_TICK(ud->canmove_tick, tick) > 0) // Keep waiting?
+ timer->add(ud->canmove_tick + 1, unit->walktobl_sub, id, data);
+ else if (unit->can_move(bl) != 0 && unit->walktoxy_sub(bl) == 0)
+ set_mobstate(bl, ud->state.attack_continue);
}
return 0;
}