CleverRaven/Cataclysm-DDA — pull request #9968 by Coolthulhu (2014-11-11 01:18:03+00:00)
Title: Prevents infinite recursion with chain lightning

Chain lightning forks to any non-bounced target visible from last hit location. This can cause stack overflow due to infinite recursion if a target is visible but not reachable.

Adding "bounced" status to target before actually attacking prevents this.

Actually tracing a ray to target before attacking to check would obstacles wouldn't be as trivial as it sounds, as chain lightning projectiles have non-zero dispersion