version 1.13 | | version 1.14 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.13 2000/05/26 09:50:49 jec Exp $"; | | * "$Id: player.c,v 1.14 2000/05/29 16:31:26 jec Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
static void fire_bow(object *op, int dir) | | static void fire_bow(object *op, int dir) |
{ | | { |
object *bow, *arrow = NULL, *left; | | object *bow, *arrow = NULL, *left; |
| | tag_t left_tag; |
for(bow=op->inv; bow; bow=bow->below) | | for(bow=op->inv; bow; bow=bow->below) |
if(bow->type==BOW && QUERY_FLAG(bow, FLAG_APPLIED)) | | if(bow->type==BOW && QUERY_FLAG(bow, FLAG_APPLIED)) |
break; | | break; |
| | |
return; | | return; |
} | | } |
left = arrow; /* these are arrows left to the player */ | | left = arrow; /* these are arrows left to the player */ |
| | left_tag = left->count; |
arrow = get_split_ob(arrow, 1); | | arrow = get_split_ob(arrow, 1); |
set_owner(arrow,op); | | set_owner(arrow,op); |
arrow->direction=dir; | | arrow->direction=dir; |
| | |
play_sound_map(op->map, op->x, op->y, SOUND_FIRE_ARROW); | | play_sound_map(op->map, op->x, op->y, SOUND_FIRE_ARROW); |
insert_ob_in_map(arrow,op->map,op); | | insert_ob_in_map(arrow,op->map,op); |
move_arrow(arrow); | | move_arrow(arrow); |
if (QUERY_FLAG(left, FLAG_FREED)) | | if (was_destroyed (left, left_tag)) |
esrv_del_item(op->contr, left->count); | | esrv_del_item(op->contr, left_tag); |
else | | else |
esrv_send_item(op, left); | | esrv_send_item(op, left); |
} | | } |