summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 2f46a0d9c..2f908cecf 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -80,8 +80,10 @@ int unit_walktoxy_sub(struct block_list *bl)
ud->state.change_walk_target=0;
- if (bl->type == BL_PC)
+ if (bl->type == BL_PC) {
+ ((TBL_PC *)bl)->head_dir = 0;
clif_walkok((TBL_PC*)bl);
+ }
clif_move(bl);
if(ud->walkpath.path_pos>=ud->walkpath.path_len)
@@ -134,8 +136,6 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
dir = ud->walkpath.path[ud->walkpath.path_pos];
ud->dir = dir;
- if (sd)
- sd->head_dir = dir;
dx = dirx[(int)dir];
dy = diry[(int)dir];
@@ -341,7 +341,6 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int
sc = status_get_sc(bl);
if (sc && sc->count && sc->data[SC_CONFUSION].timer != -1) //Randomize the target position
map_random_dir(bl, &ud->to_x, &ud->to_y);
-
if(ud->walktimer != -1) {
ud->state.change_walk_target = 1;
@@ -435,7 +434,6 @@ int unit_movepos(struct block_list *bl,int dst_x,int dst_y, int easy, int checkp
dir = map_calc_dir(bl, dst_x,dst_y);
ud->dir = dir;
- if(sd) sd->head_dir = dir;
dx = dst_x - bl->x;
dy = dst_y - bl->y;
@@ -486,7 +484,7 @@ int unit_setdir(struct block_list *bl,unsigned char dir)
if (!ud) return 0;
ud->dir = dir;
if (bl->type == BL_PC)
- ((TBL_PC *)bl)->head_dir = dir;
+ ((TBL_PC *)bl)->head_dir = 0;
clif_changed_dir(bl, AREA);
return 0;
}
@@ -1336,7 +1334,6 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
if (battle_config.attack_direction_change &&
(src->type&battle_config.attack_direction_change)) {
ud->dir = map_calc_dir(src, target->x,target->y );
- if (sd) sd->head_dir = ud->dir;
}
if(ud->walktimer != -1)
unit_stop_walking(src,1);