summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-18 06:10:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-18 06:10:49 +0000
commit1f94317bebf10175fb02c0f22e32a9010033a6c9 (patch)
tree293b36db504bfe3015b967a517cfea2c87ab77ac /src/map/pc.c
parent61047a615711051cd2896bec8c88816690a2bd0b (diff)
downloadhercules-1f94317bebf10175fb02c0f22e32a9010033a6c9.tar.gz
hercules-1f94317bebf10175fb02c0f22e32a9010033a6c9.tar.bz2
hercules-1f94317bebf10175fb02c0f22e32a9010033a6c9.tar.xz
hercules-1f94317bebf10175fb02c0f22e32a9010033a6c9.zip
- Added an alternate path searching method for non-stacking mode.
- Allowed pc_setpos to place players on top of cells that are stacked in CELL_NOSTACK mode. - Fixed a missing break that was making Heal, Resurrection and some others become attack skills x.x' - Fixed a logic bug in the mob-walk code that was making them get stuck and not move (triggered quite often when the cell no stack mod is enabled) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5320 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 4a3381e4f..0d10dfc69 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3316,7 +3316,11 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
if(x <0 || x >= map[m].xs || y <0 || y >= map[m].ys)
x=y=0;
if((x==0 && y==0) ||
+#ifndef CELL_NOSTACK
(map_getcell(m,x,y,CELL_CHKNOPASS) && !map_getcell(m, x, y, CELL_CHKICEWALL))
+#else
+ (map_getcell(m,x,y,CELL_CHKNOPASS) && !map_getcell(m, x, y, CELL_CHKICEWALL) && !map_getcell(m, x, y, CELL_CHKSTACK))
+#endif
){ //We allow placing players on top of an ICEWALL tile to prevent force-warping players when an ice wall is placed
//at spawn points from warps and the like. [Skotlex]
if(x||y) {