From 665855f460eb454d028f9f81c6779539bef7e494 Mon Sep 17 00:00:00 2001 From: skyleo Date: Thu, 3 Oct 2019 02:11:48 +0200 Subject: Update Coding Style for unit->walktobl_sub --- src/map/unit.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2