summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-10 15:30:10 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-10 15:30:10 +0000
commitcc01193a8ae7de206290129eb1bbf3296a28d1bf (patch)
tree61aa5c25aa4b9a9ccb72cb84a856350dac38e212 /src/map/map.c
parentce55e06f289c7c124be78b9bf7e4069d940c34f4 (diff)
downloadhercules-cc01193a8ae7de206290129eb1bbf3296a28d1bf.tar.gz
hercules-cc01193a8ae7de206290129eb1bbf3296a28d1bf.tar.bz2
hercules-cc01193a8ae7de206290129eb1bbf3296a28d1bf.tar.xz
hercules-cc01193a8ae7de206290129eb1bbf3296a28d1bf.zip
- Added pc_issit check to pc_can_move
- Stone/Freeze/Stun/Sleep now make you stand up as well. - Some logic pointer fixes on map_searchrandfreecell. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5251 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 4ffd10414..e1d97b0de 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1324,18 +1324,18 @@ int map_searchrandfreecell(int m,int *x,int *y,int stack) {
int free_cells[9][2];
for(free_cell=0,i=-1;i<=1;i++){
- if(i+y<0 || i+y>=map[m].ys)
+ if(i+*y<0 || i+*y>=map[m].ys)
continue;
for(j=-1;j<=1;j++){
- if(j+x<0 || j+x>=map[m].xs)
+ if(j+*x<0 || j+*x>=map[m].xs)
continue;
- if(map_getcell(m,j+x,i+y,CELL_CHKNOPASS))
+ if(map_getcell(m,j+*x,i+*y,CELL_CHKNOPASS))
continue;
//Avoid item stacking to prevent against exploits. [Skotlex]
- if(stack && map_count_oncell(m,j+x,i+y, BL_ITEM) > stack)
+ if(stack && map_count_oncell(m,j+*x,i+*y, BL_ITEM) > stack)
continue;
- free_cells[free_cell][0] = j+x;
- free_cells[free_cell++][1] = i+y;
+ free_cells[free_cell][0] = j+*x;
+ free_cells[free_cell++][1] = i+*y;
}
}
if(free_cell==0)