diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-26 18:47:04 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-26 18:47:04 +0000 |
commit | a028a5fa44a6eb6b0ed87781eb18b8555eb08837 (patch) | |
tree | 47a3c8144bf0c11ece28b41767f0c7d6d993869e /src/map/path.c | |
parent | 48f2ec3f27a57a7fe3c60f5475174c075eec890d (diff) | |
download | hercules-a028a5fa44a6eb6b0ed87781eb18b8555eb08837.tar.gz hercules-a028a5fa44a6eb6b0ed87781eb18b8555eb08837.tar.bz2 hercules-a028a5fa44a6eb6b0ed87781eb18b8555eb08837.tar.xz hercules-a028a5fa44a6eb6b0ed87781eb18b8555eb08837.zip |
* Added Bitmap File system
* Added --run_once flag
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@789 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/path.c')
-rw-r--r-- | src/map/path.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/map/path.c b/src/map/path.c index b2e0a78a8..9fb0ab1b7 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -168,17 +168,13 @@ static int add_path(int *heap,struct tmp_path *tp,int x,int y,int dist,int dir,i */ static int can_place(struct map_data *m,int x,int y,int flag) { - int c; - nullpo_retr(0, m); - c=read_gatp(m,x,y); - - if(c==1) - return 0; - if(!(flag&0x10000) && c==5) - return 0; - return 1; + if(map_getcellp(m,x,y,CELL_CHKPASS)) + return 1; + else if((flag&0x10000)&&map_getcellp(m,x,y,CELL_CHKHIGH)) + return 1; + return 0; } /*========================================== @@ -262,7 +258,7 @@ int path_search(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int if(!map[m].gat) return -1; md=&map[m]; - if(x1<0 || x1>=md->xs || y1<0 || y1>=md->ys || (i=read_gatp(md,x1,y1))==1 || i==5) + if(x1<0 || x1>=md->xs || y1<0 || y1>=md->ys || map_getcellp(md,x1,y1,CELL_CHKNOPASS)) return -1; // easy |