summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-18 15:09:30 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-18 15:09:30 +0000
commit09be69eca7b318cd1f3bcc16a7732712d1b705c7 (patch)
treeafcc0212eb45e2819cac5c2ca2b62023363b05e0
parent53e154561caec018e734900a0a4e53cf35e3f2c0 (diff)
downloadhercules-09be69eca7b318cd1f3bcc16a7732712d1b705c7.tar.gz
hercules-09be69eca7b318cd1f3bcc16a7732712d1b705c7.tar.bz2
hercules-09be69eca7b318cd1f3bcc16a7732712d1b705c7.tar.xz
hercules-09be69eca7b318cd1f3bcc16a7732712d1b705c7.zip
- Modified the Asura code (again), hopefully movement sprite issues are fixed now
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8793 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/skill.c26
-rw-r--r--src/map/unit.c2
3 files changed, 25 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index f543a3f72..3a7cc966e 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/09/18
+ * Modified the Asura code (again), hopefully movement sprite issues are
+ fixed now [Skotlex]
* @reloadscript scripts will no longer eliminate mobs with no respawn data.
But watch out for possible bugs (I think someone mentioned 1 extra
treasure box will spawn when you use it? This needs testing!) [Skotlex]
diff --git a/src/map/skill.c b/src/map/skill.c
index af022a5af..34d1740db 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2852,13 +2852,31 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
if (sc->data[SC_BLADESTOP].timer != -1)
status_change_end(src,SC_BLADESTOP,-1);
}
- //Client expects you to move to target regardless
- if(unit_walktobl(src, bl, 1, 1)) {
+ //Client expects you to move to target regardless of distance
+ {
struct unit_data *ud = unit_bl2ud(src);
+ short dx,dy;
int i,speed;
+
+ dx = bl->x - src->x;
+ dy = bl->y - src->y;
+ if (dx < 0) dx--;
+ else if (dx > 0) dx++;
+ if (dy < 0) dy--;
+ else if (dy > 0) dy++;
+ if (!dx && !dy) dy++;
+ if (map_getcell(src->m, src->x+dx, src->y+dy, CELL_CHKNOPASS))
+ {
+ dx = bl->x;
+ dy = bl->y;
+ } else {
+ dx = src->x + dx;
+ dy = src->y + dy;
+ }
+
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- if (ud) {
- ud->target = 0; //Clear target, as you shouldn't be chasing it if you can't get there on time.
+
+ if(unit_walktoxy(src, dx, dy, 2) && ud) {
//Increase can't walk delay to not alter your walk path
ud->canmove_tick = tick;
speed = status_get_speed(src);
diff --git a/src/map/unit.c b/src/map/unit.c
index c6c8a6dc1..9417115ed 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -262,7 +262,7 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
return 0;
}
-//Easy parameter: &1 -> 1/2 = easy/hard, &2 -> force walking.
+//Easy parameter: &1 -> 1/0 = easy/hard, &2 -> force walking.
int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
struct unit_data *ud = NULL;
struct status_change *sc = NULL;