From 0cd471b3e4ec92c94e960de4fd5c2a19ad0ee2f9 Mon Sep 17 00:00:00 2001 From: csnv Date: Sat, 3 Jan 2015 20:28:09 +0100 Subject: Fixes the direction of an object (char, mob, etc) when it faces a target after an action (skill, attack) --- src/map/skill.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index 423bcf630..34689bd9d 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5008,6 +5008,9 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) { else ud->skill_id = 0; //mobs can't clear this one as it is used for skill condition 'afterskill' ud->skill_lv = ud->skilltarget = 0; } + + unit->setdir(src, map->calc_dir(src, target->x, target->y)); + map->freeblock_unlock(); return 1; } while(0); @@ -9843,6 +9846,8 @@ int skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { ud->skill_lv = ud->skillx = ud->skilly = 0; } + unit->setdir(src, map->calc_dir(src, ud->skillx, ud->skilly)); + map->freeblock_unlock(); return 1; } while(0); -- cgit v1.2.3-70-g09d2