--- deliantra/server/server/attack.C 2012/10/29 23:55:55 1.148 +++ deliantra/server/server/attack.C 2016/11/16 23:18:54 1.149 @@ -1020,7 +1020,7 @@ * but is no longer on the map. Ugh. (Beware: Such things can happen at * other places as well!) */ - if (hitter->destroyed () || hitter->env != NULL) + if (hitter->destroyed () || hitter->env) { if (container) container->destroy (); @@ -1029,53 +1029,53 @@ } /* Missile hit victim */ - /* if the speed is > 10, then this is a fast moving arrow, we go straight - * through the target + /* if the speed is >= 10, then this is a fast moving arrow, we go straight + * through the target */ - if (hit_something && op->speed <= 10.0) - { - /* Stop arrow */ - if (!container) - { - hitter = fix_stopped_arrow (hitter); - if (!hitter) - return 0; - } - else - container->destroy (); + if (hit_something) + if (op->speed < 10.0) + { + /* Stop arrow */ + if (!container) + { + hitter = fix_stopped_arrow (hitter); + if (!hitter) + return 0; + } + else + container->destroy (); + + /* Try to stick arrow into victim */ + if (!victim->destroyed () && stick_arrow (hitter, victim)) + return 0; + + /* Else try to put arrow on victim's map square + * remove check for P_WALL here. If the arrow got to this + * space, that is good enough - with the new movement code, + * there is now the potential for lots of spaces where something + * can fly over but not otherwise move over. What is the correct + * way to handle those otherwise? + */ + if (victim->x != hitter->x || victim->y != hitter->y) + { + if (victim->destroyed ()) + hitter->destroy (); + else + { + hitter->remove (); + hitter->x = victim->x; + hitter->y = victim->y; + insert_ob_in_map (hitter, victim->map, hitter, 0); + } + } + else + /* Else leave arrow where it is */ + merge_ob (hitter, NULL); - /* Try to stick arrow into victim */ - if (!victim->destroyed () && stick_arrow (hitter, victim)) return 0; - - /* Else try to put arrow on victim's map square - * remove check for P_WALL here. If the arrow got to this - * space, that is good enough - with the new movement code, - * there is now the potential for lots of spaces where something - * can fly over but not otherwise move over. What is the correct - * way to handle those otherwise? - */ - if (victim->x != hitter->x || victim->y != hitter->y) - { - if (victim->destroyed ()) - hitter->destroy (); - else - { - hitter->remove (); - hitter->x = victim->x; - hitter->y = victim->y; - insert_ob_in_map (hitter, victim->map, hitter, 0); - } - } - else - /* Else leave arrow where it is */ - merge_ob (hitter, NULL); - - return 0; - } - - if (hit_something && op->speed >= 10.0) - op->set_speed (op->speed - 1.f); + } + else + op->set_speed (op->speed - 1.f); /* Missile missed victim - reassemble missile */ if (container)