version 1.169 | | version 1.170 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.169 2005/08/08 06:27:30 mwedel Exp $"; | | * "$Id: player.c,v 1.170 2005/08/10 04:57:47 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
object *left, *bow; | | object *left, *bow; |
tag_t left_tag, tag; | | tag_t left_tag, tag; |
int bowspeed, mflags; | | int bowspeed, mflags; |
| | mapstruct *m; |
| | |
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); | | mflags = get_map_flags(op->map,&m, sx, sy, &sx, &sy); |
if ( mflags & P_WALL) { | | if ( mflags & 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 (bow->slaying != NULL) | | if (bow->slaying != NULL) |
arrow->slaying = add_string(bow->slaying); | | arrow->slaying = add_string(bow->slaying); |
| | |
arrow->map = op->map; | | arrow->map = m; |
SET_FLAG(arrow, FLAG_FLYING); | | SET_FLAG(arrow, FLAG_FLYING); |
SET_FLAG(arrow, FLAG_FLY_ON); | | SET_FLAG(arrow, FLAG_FLY_ON); |
SET_FLAG(arrow, FLAG_WALK_ON); | | SET_FLAG(arrow, FLAG_WALK_ON); |
play_sound_map(op->map, op->x, op->y, SOUND_FIRE_ARROW); | | play_sound_map(op->map, op->x, op->y, SOUND_FIRE_ARROW); |
tag = arrow->count; | | tag = arrow->count; |
insert_ob_in_map(arrow, op->map, op, 0); | | insert_ob_in_map(arrow, m, op, 0); |
| | |
if (!was_destroyed(arrow, tag)) | | if (!was_destroyed(arrow, tag)) |
move_arrow(arrow); | | move_arrow(arrow); |