summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-26 18:47:04 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-26 18:47:04 +0000
commita028a5fa44a6eb6b0ed87781eb18b8555eb08837 (patch)
tree47a3c8144bf0c11ece28b41767f0c7d6d993869e /src/map/pet.c
parent48f2ec3f27a57a7fe3c60f5475174c075eec890d (diff)
downloadhercules-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/pet.c')
-rw-r--r--src/map/pet.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index c07fbc179..be077b84e 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -203,7 +203,7 @@ static int pet_attack(struct pet_data *pd,unsigned int tick,int data)
static int pet_walk(struct pet_data *pd,unsigned int tick,int data)
{
int moveblock;
- int i,ctype;
+ int i;
int x,y,dx,dy;
nullpo_retr(0, pd);
@@ -235,8 +235,7 @@ static int pet_walk(struct pet_data *pd,unsigned int tick,int data)
dx = dirx[pd->dir];
dy = diry[pd->dir];
- ctype = map_getcell(pd->bl.m,x+dx,y+dy);
- if(ctype == 1 || ctype == 5) {
+ if(map_getcell(pd->bl.m,x+dx,y+dy,CELL_CHKNOPASS)){
pet_walktoxy_sub(pd);
return 0;
}
@@ -1058,7 +1057,7 @@ static int pet_randomwalk(struct pet_data *pd,int tick)
int r=rand();
x=pd->bl.x+r%(d*2+1)-d;
y=pd->bl.y+r/(d*2+1)%(d*2+1)-d;
- if((c=map_getcell(pd->bl.m,x,y))!=1 && c!=5 && pet_walktoxy(pd,x,y)==0){
+ if((map_getcell(pd->bl.m,x,y,CELL_CHKPASS))&&( pet_walktoxy(pd,x,y)==0)){
pd->move_fail_count=0;
break;
}