version 1.149 | | version 1.150 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.149 2004/04/07 06:46:43 mwedel Exp $"; | | * "$Id: player.c,v 1.150 2004/04/16 06:23:44 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
mflags = get_map_flags(m, &m, x, y, &x, &y); | | mflags = get_map_flags(m, &m, x, y, &x, &y); |
| | |
/* Space is blocked - try changing direction a little */ | | /* Space is blocked - try changing direction a little */ |
if ((mflags & (P_BLOCKED | P_OUT_OF_MAP)) && (m == mon->map && blocked_link(mon, x, y))) { | | if ((mflags & (P_BLOCKED | P_OUT_OF_MAP)) && (m == mon->map && blocked_link(mon, m, x, y))) { |
/* recalculate direction from last good location. Possible | | /* recalculate direction from last good location. Possible |
* we were not traversing ideal location before. | | * we were not traversing ideal location before. |
*/ | | */ |
| | |
m = lastmap; | | m = lastmap; |
mflags = get_map_flags(m, &m, x, y, &x, &y); | | mflags = get_map_flags(m, &m, x, y, &x, &y); |
if (!(mflags & (P_OUT_OF_MAP | P_BLOCKED)) && | | if (!(mflags & (P_OUT_OF_MAP | P_BLOCKED)) && |
(m == mon->map && blocked_link(mon, x, y))) break; | | (m == mon->map && blocked_link(mon, m, x, y))) break; |
} | | } |
/* go through entire loop without finding a valid | | /* go through entire loop without finding a valid |
* sidestep to take - thus, no valid path. | | * sidestep to take - thus, no valid path. |