… | |
… | |
1542 | { |
1542 | { |
1543 | new_draw_info (NDI_UNIQUE, 0, op, "You can't shoot yourself!"); |
1543 | new_draw_info (NDI_UNIQUE, 0, op, "You can't shoot yourself!"); |
1544 | return 0; |
1544 | return 0; |
1545 | } |
1545 | } |
1546 | |
1546 | |
1547 | if (op->type == PLAYER) |
1547 | if (player *pl = op->contr) |
|
|
1548 | { |
1548 | bow = op->contr->ranged_ob; |
1549 | bow = pl->ranged_ob; |
|
|
1550 | |
|
|
1551 | if (op->current_weapon != pl->ranged_ob) |
|
|
1552 | { |
|
|
1553 | op->current_weapon = pl->ranged_ob; |
|
|
1554 | new_draw_info_format (NDI_UNIQUE, 0, op, "You switch to your %s.", &op->current_weapon->name); |
|
|
1555 | op->update_stats (); |
|
|
1556 | } |
|
|
1557 | } |
1549 | else |
1558 | else |
1550 | { |
1559 | { |
1551 | for (bow = op->inv; bow; bow = bow->below) |
1560 | for (bow = op->inv; bow; bow = bow->below) |
1552 | /* Don't check for applied - monsters don't apply bows - in that way, they |
1561 | /* Don't check for applied - monsters don't apply bows - in that way, they |
1553 | * don't need to switch back and forth between bows and weapons. |
1562 | * don't need to switch back and forth between bows and weapons. |