summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-04 18:41:54 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-04 18:41:54 +0000
commitb4a305c08f2e6aaf2f1179462958af0f0b184fd2 (patch)
treea121a74319c742f7b8cdb303192792fc71ab597a /src/map/unit.c
parentb8431ef147bb1f98ace6dcad5bfaa7d5e0a02897 (diff)
downloadhercules-b4a305c08f2e6aaf2f1179462958af0f0b184fd2.tar.gz
hercules-b4a305c08f2e6aaf2f1179462958af0f0b184fd2.tar.bz2
hercules-b4a305c08f2e6aaf2f1179462958af0f0b184fd2.tar.xz
hercules-b4a305c08f2e6aaf2f1179462958af0f0b184fd2.zip
* Corrected Icewall skill to be closer to official behavior (part of bugreport:38)
- now works on occupied squares (previously it disappeared) - now you can walk out of an icewall square (removed code that blocked pathfinding if the origin cell was of a nonwalkable type) - added back the hack where mapcell changes are broadcast to whole map (prevents client from leaving the cells non-walkable if you warp away) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11354 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 17d9581f1..ddc590396 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -457,13 +457,9 @@ int unit_run(struct block_list *bl)
int unit_escape(struct block_list *bl, struct block_list *target, int dist)
{
int dir = map_calc_dir(target, bl->x, bl->y);
- while (dist > 0 && map_getcell(bl->m,
- bl->x + dist*dirx[dir], bl->y + dist*diry[dir],
- CELL_CHKNOREACH))
+ while( dist > 0 && map_getcell(bl->m, bl->x + dist*dirx[dir], bl->y + dist*diry[dir], CELL_CHKNOREACH) )
dist--;
- return (dist > 0 && unit_walktoxy(bl,
- bl->x + dist*dirx[dir], bl->y + dist*diry[dir],
- 0));
+ return ( dist > 0 && unit_walktoxy(bl, bl->x + dist*dirx[dir], bl->y + dist*diry[dir], 0) );
}
//Instant warp function.