… | |
… | |
646 | if (op) |
646 | if (op) |
647 | merge_ob (op, 0); |
647 | merge_ob (op, 0); |
648 | } |
648 | } |
649 | } |
649 | } |
650 | |
650 | |
651 | /* Move an arrow along its course. op is the arrow or thrown object. |
651 | /* Move an arrow or throwen_obj along its course. op is the arrow or thrown object. |
652 | */ |
652 | */ |
653 | void |
653 | void |
654 | move_arrow (object *op) |
654 | move_arrow (object *op) |
655 | { |
655 | { |
656 | int was_reflected; |
656 | int was_reflected; |
… | |
… | |
684 | stop_arrow (op); |
684 | stop_arrow (op); |
685 | return; |
685 | return; |
686 | } |
686 | } |
687 | } |
687 | } |
688 | |
688 | |
|
|
689 | /* decrease the speed as it flies. 0.05 means a standard bow will shoot |
|
|
690 | * about 17 squares. Tune as needed. |
|
|
691 | */ |
|
|
692 | op->speed -= 0.05; |
|
|
693 | |
689 | /* if the arrow is moving too slow.. stop it. 0.5 was chosen as lower |
694 | /* if the arrow is moving too slow.. stop it. 0.5 was chosen as lower |
690 | values look rediculous. */ |
695 | values look rediculous. */ |
691 | if (op->speed < 0.5 && op->type == ARROW) |
696 | if (op->speed < (op->type == ARROW ? 0.05 : MIN_ACTIVE_SPEED)) |
692 | { |
697 | { |
693 | stop_arrow (op); |
698 | stop_arrow (op); |
694 | return; |
699 | return; |
695 | } |
700 | } |
696 | |
701 | |
… | |
… | |
751 | * note that this code will now catch cases where a monster is |
756 | * note that this code will now catch cases where a monster is |
752 | * on a wall but has reflecting - the arrow won't reflect. |
757 | * on a wall but has reflecting - the arrow won't reflect. |
753 | * Mapmakers shouldn't put monsters on top of wall in the first |
758 | * Mapmakers shouldn't put monsters on top of wall in the first |
754 | * place, so I don't consider that a problem. |
759 | * place, so I don't consider that a problem. |
755 | */ |
760 | */ |
756 | if (!op->flag [FLAG_REFLECTING] || !(rndm (0, 19))) |
761 | if (!op->flag [FLAG_REFLECTING] || !rndm (0, 19)) |
757 | { |
762 | { |
758 | stop_arrow (op); |
763 | stop_arrow (op); |
759 | return; |
764 | return; |
760 | } |
765 | } |
761 | else |
766 | else |
… | |
… | |
814 | /* many thrown objects *don't* have more than one face */ |
819 | /* many thrown objects *don't* have more than one face */ |
815 | if (op->has_anim ()) |
820 | if (op->has_anim ()) |
816 | op->set_anim_frame (op->direction); |
821 | op->set_anim_frame (op->direction); |
817 | } /* object is reflected */ |
822 | } /* object is reflected */ |
818 | } /* object ran into a wall */ |
823 | } /* object ran into a wall */ |
819 | |
|
|
820 | /* decrease the speed as it flies. 0.05 means a standard bow will shoot |
|
|
821 | * about 17 squares. Tune as needed. |
|
|
822 | */ |
|
|
823 | op->speed -= 0.05; |
|
|
824 | |
824 | |
825 | /* Move the arrow. */ |
825 | /* Move the arrow. */ |
826 | op->move_to (pos); |
826 | op->move_to (pos); |
827 | } |
827 | } |
828 | |
828 | |