CleverRaven/Cataclysm-DDA — pull request #4031 by ianestrachan (2013-11-01 05:43:21+00:00)
Title: Static vehicle spawns, the beginning

Tweaks vehicle spawning to, in general, clear roads slightly... but introduce some new, more interesting obstacles.

* 66% chance of spawning 1-3 vehicles (was 75% before).
* 33% chance of an empty section of road (was 25% before).
* Otherwise, something special:
* 0.75% chance of a jack-knifed semi.
* 0.20% chance of a pile-up of random vehicles (mostly cars).
* 0.05% chance of a pile-up of police cars. (It's a Blues Brothers reference)

I took a crack at trying to fix vehicles crossing map boundaries - I can tell when a vehicle has crossed the boundary into a map, but I can't figure out how to actually get a reference to the next map over to check its vehicles and terrain. As a result, the x+y spawning range for jack-knifed semis and pileups is a bit narrow to minimize the chances of them clipping through stuff on the edges of the next submap over.