summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorKevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-05 05:28:01 +0000
committerKevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-05 05:28:01 +0000
commit7d97ab538018917806545ad7060fd968c5e914a3 (patch)
tree8b4933160a5ae5a898a6511e1b8cb31f107cdaef /src/map/unit.c
parented5080a4e20fe5165fd37455e8b4aa83c093a609 (diff)
downloadhercules-7d97ab538018917806545ad7060fd968c5e914a3.tar.gz
hercules-7d97ab538018917806545ad7060fd968c5e914a3.tar.bz2
hercules-7d97ab538018917806545ad7060fd968c5e914a3.tar.xz
hercules-7d97ab538018917806545ad7060fd968c5e914a3.zip
PCs/Mobs/NPCs now block Leap(TK_HIGHJUMP) and sprint(TK_RUN). (bugreport:1155)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12485 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 252b65188..fa6c075db 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -420,6 +420,11 @@ int unit_run(struct block_list *bl)
{
if(!map_getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
break;
+
+ //if sprinting and there's a PC/Mob/NPC, block the path [Kevin]
+ if(sc->data[SC_RUN] && map_count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC))
+ break;
+
to_x += dir_x;
to_y += dir_y;
}