version 1.168 | | version 1.169 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.168 2005/07/30 15:03:00 ryo_saeba Exp $"; | | * "$Id: player.c,v 1.169 2005/08/08 06:27:30 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* player fire modes. | | * player fire modes. |
*/ | | */ |
int fire_bow(object *op, object *part, object *arrow, int dir, int wc_mod, | | int fire_bow(object *op, object *part, object *arrow, int dir, int wc_mod, |
int sx, int sy) | | sint16 sx, sint16 sy) |
{ | | { |
object *left, *bow; | | object *left, *bow; |
tag_t left_tag, tag; | | tag_t left_tag, tag; |
int bowspeed; | | int bowspeed, mflags; |
| | |
if (!dir) { | | if (!dir) { |
new_draw_info(NDI_UNIQUE, 0, op, "You can't shoot yourself!"); | | new_draw_info(NDI_UNIQUE, 0, op, "You can't shoot yourself!"); |
| | |
return 0; | | return 0; |
} | | } |
} | | } |
| | mflags = get_map_flags(op->map,NULL, sx, sy, &sx, &sy); |
if(get_map_flags(op->map,NULL, op->x+freearr_x[dir],op->y+freearr_y[dir], NULL, NULL) & | | if ( mflags & P_WALL) { |
P_WALL) { | | |
new_draw_info(NDI_UNIQUE, 0,op,"Something is in the way."); | | new_draw_info(NDI_UNIQUE, 0,op,"Something is in the way."); |
return 0; | | return 0; |
} | | } |
| | if (mflags & P_OUT_OF_MAP) { |
| | return 0; |
| | } |
| | |
/* this should not happen, but sometimes does */ | | /* this should not happen, but sometimes does */ |
if (arrow->nrof==0) { | | if (arrow->nrof==0) { |