version 1.116 | | version 1.117 |
---|
| | |
/* | | /* |
* static char *rcsid_object_c = | | * static char *rcsid_object_c = |
* "$Id: object.c,v 1.116 2005/12/05 23:34:03 akirschbaum Exp $"; | | * "$Id: object.c,v 1.117 2005/12/10 14:27:09 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
ny = y + freearr_y[i]; | | ny = y + freearr_y[i]; |
| | |
mflags = get_map_flags(m, &mp, nx, ny, &nx, &ny); | | mflags = get_map_flags(m, &mp, nx, ny, &nx, &ny); |
| | if (mflags & P_OUT_OF_MAP) { |
| | max = maxfree[i]; |
| | } else { |
blocked = GET_MAP_MOVE_BLOCK(mp, nx, ny); | | blocked = GET_MAP_MOVE_BLOCK(mp, nx, ny); |
| | |
if ((move_type & blocked) == move_type) | | if ((move_type & blocked) == move_type) { |
max=maxfree[i]; | | max=maxfree[i]; |
else if (mflags & P_IS_ALIVE) { | | } else if (mflags & P_IS_ALIVE) { |
for (tmp=GET_MAP_OB(mp,nx,ny); tmp!= NULL; tmp=tmp->above) { | | for (tmp=GET_MAP_OB(mp,nx,ny); tmp!= NULL; tmp=tmp->above) { |
if ((QUERY_FLAG(tmp,FLAG_MONSTER) || tmp->type==PLAYER) && | | if ((QUERY_FLAG(tmp,FLAG_MONSTER) || tmp->type==PLAYER) && |
(tmp != exclude ||(tmp->head && tmp->head != exclude))) break; | | (tmp != exclude ||(tmp->head && tmp->head != exclude))) { |
| | break; |
} | | } |
if(tmp) | | } |
| | if(tmp) { |
return freedir[i]; | | return freedir[i]; |
} | | } |
} | | } |
| | } |
| | } |
return 0; | | return 0; |
} | | } |
| | |