summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-13 14:35:43 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-13 14:35:43 +0000
commit18282ae649b0c2d54deaba32132171cbf56a1868 (patch)
tree9c14a42cb333a4e6dc4f512c050b54b37fddcff7 /src/map/unit.c
parent61ac274ddcc1307b86d31d152260bf6dcd1360c3 (diff)
downloadhercules-18282ae649b0c2d54deaba32132171cbf56a1868.tar.gz
hercules-18282ae649b0c2d54deaba32132171cbf56a1868.tar.bz2
hercules-18282ae649b0c2d54deaba32132171cbf56a1868.tar.xz
hercules-18282ae649b0c2d54deaba32132171cbf56a1868.zip
- Volcano/Deluge/Violent Gale are now interchangeable, in the sense that as long as one of these is out, casting any of the three will not consume gems, and will use the remaining time of the previous one. In turn, Land Protector will now always consume gems on every cast.
- Small cleanup in the Land protector code which may fix it not blocking AoE skills. - Fixed the interpretation of "head_dir". Removed setting head_dir to match character direction in the whole code. Now it is only reset to 0 (look forward) when unit_setpos is invoked, or when a character begins walking. Thanks to FlavioJS for figuring out how the client parses the head direction. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9206 54d463be-8e91-2dee-dedb-b68131a5f0ec
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);