summaryrefslogtreecommitdiff
path: root/src/map/map.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/map.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/map.c')
-rw-r--r--src/map/map.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 668929dfc..967edbab9 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2189,25 +2189,25 @@ int map_calc_dir(struct block_list* src, int x, int y)
}
else if( dx >= 0 && dy >=0 )
{ // upper-right
- if( dx*2-1 < dy ) dir = 0; // up
+ if( dx*2 <= dy ) dir = 0; // up
else if( dx > dy*2 ) dir = 6; // right
else dir = 7; // up-right
}
else if( dx >= 0 && dy <= 0 )
{ // lower-right
- if( dx*2-1 < -dy ) dir = 4; // down
+ if( dx*2 <= -dy ) dir = 4; // down
else if( dx > -dy*2 ) dir = 6; // right
else dir = 5; // down-right
}
else if( dx <= 0 && dy <= 0 )
{ // lower-left
- if( dx*2+1 > dy ) dir = 4; // down
+ if( dx*2 >= dy ) dir = 4; // down
else if( dx < dy*2 ) dir = 2; // left
else dir = 3; // down-left
}
else
{ // upper-left
- if( -dx*2-1 < dy ) dir = 0; // up
+ if( -dx*2 <= dy ) dir = 0; // up
else if( -dx > dy*2 ) dir = 2; // left
else dir = 1; // up-left