version 1.51 | | version 1.52 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.51 2001/04/20 05:39:04 mwedel Exp $"; | | * "$Id: player.c,v 1.52 2001/04/30 06:34:29 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* and the exit-coordinates sp/hp must both be > 0. | | * and the exit-coordinates sp/hp must both be > 0. |
* => The intention here is to prevent abuse of the battleground- | | * => The intention here is to prevent abuse of the battleground- |
* feature (like pickable or hidden battleground tiles). */ | | * feature (like pickable or hidden battleground tiles). */ |
for (tmp=op->below, floor=0; tmp!=NULL && !floor; tmp=tmp->below) { | | for (tmp=op->below; tmp!=NULL; tmp=tmp->below) { |
if (QUERY_FLAG (tmp, FLAG_IS_FLOOR)) { | | if (QUERY_FLAG (tmp, FLAG_IS_FLOOR)) { |
if (QUERY_FLAG (tmp, FLAG_NO_PICK) && | | if (QUERY_FLAG (tmp, FLAG_NO_PICK) && |
strcmp(tmp->name, "battleground")==0 && | | strcmp(tmp->name, "battleground")==0 && |
| | |
if (x != NULL && y != NULL) | | if (x != NULL && y != NULL) |
*x=EXIT_X(tmp), *y=EXIT_Y(tmp); | | *x=EXIT_X(tmp), *y=EXIT_Y(tmp); |
return 1; | | return 1; |
} else | | |
floor++; /* onle the uppermost IS_FLOOR object is processed */ | | |
} | | } |
} | | } |
| | } |
tmp = NULL; | | /* If we got here, did not find a battleground */ |
return 0; | | return 0; |
} | | } |
| | |