CleverRaven/Cataclysm-DDA — pull request #2935 by ianestrachan (2013-09-09 17:54:19+00:00)
Title: Fixed vehicle-wall spawning collisions destroying the wrong terrain.

Today, I learned about submaps and how g->m is the current submap, which in all likelihood is not the submap on which most functions in mapgen.cpp are acting upon...

Should fix random lone smashed-up cars and random huge gaping holes in buildings (as cool as that was) by keeping the cars and building holes together.

Speaking of which though, instead of just making perfect 5x5 squares of rubble to create craters in the sides of buildings, why not use map::destroy() on appropriate terrain types? It'll actually look like an explosion occurred, rather than a perfect square of terrain being vaporized. Walls will scatter nails and pieces of wood and rebar everywhere, furniture will break instead of vanishing, and so on. If it could turn otherwise-empty squares into rubble, it might be a better way to create craters in general.