CleverRaven/Cataclysm-DDA — pull request #9779 by Coolthulhu (2014-11-01 04:31:33+00:00)
Title: Fix bystanders' blood spawning at original target

splatter was fed entire bullet trajectory and then used continue_line to extend this trajectory. Since continue_line continues the line from the last tile of trajectory, it spawned splatters at bullets' original destination, even if a target was hit halfway on the way.

To reproduce the bug, spawn a bleeding target (tested on spitter zombies) and shoot far behind it. Splatters will spawn near where you aim, not near bleeder's location. Also works with turrets' friendly fire.

I fixed it by making blood_traj a 2 point trajectory - starts at shooter's location, ends at actually hit target. This slightly changes the splatter's slope, but works properly with continue_line.