version 1.10 | | version 1.11 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.10 2000/04/22 07:16:41 cvs Exp $"; | | * "$Id: player.c,v 1.11 2000/05/08 03:22:52 cvs Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
else friendly = QUERY_FLAG(who,FLAG_FRIENDLY); | | else friendly = QUERY_FLAG(who,FLAG_FRIENDLY); |
| | |
/* search adjacent squares */ | | /* search adjacent squares */ |
for(i=1;i<9;i++) | | for(i=1;i<9;i++) { |
for(tmp=get_map_ob(who->map,who->x+freearr_x[i],who->y+freearr_y[i]);tmp;tmp=tmp->above) | | if (out_of_map(who->map, who->x+freearr_x[i],who->y+freearr_y[i])) continue; |
| | for(tmp=get_map_ob(who->map,who->x+freearr_x[i],who->y+freearr_y[i]); |
| | tmp;tmp=tmp->above) { |
| | |
if((player||friendly) | | if((player||friendly) |
&&QUERY_FLAG(tmp,FLAG_MONSTER)&&!QUERY_FLAG(tmp,FLAG_UNAGGRESSIVE)) | | &&QUERY_FLAG(tmp,FLAG_MONSTER)&&!QUERY_FLAG(tmp,FLAG_UNAGGRESSIVE)) |
return 1; | | return 1; |
else if(tmp->type==PLAYER) return 1; | | else if(tmp->type==PLAYER) return 1; |
| | } |
| | } |
| | |
return 0; | | return 0; |
} | | } |