CleverRaven/Cataclysm-DDA — pull request #4061 by Falconne (2013-11-02 12:15:57+00:00)
Title: Initialize some submap properties when struct is constructed

A couple of properties in the submap struct are only initialized when new maps are generated, not when a savegame is loaded. That means these variables could start off with random values that get incremented and decremented, leading to unusual bugs.

In my case active_item_count had a large negative value, resulting in process_active_items_in_submap() never getting called (so thrown grenades never explode, etc). This was a debug build... I think release builds in most compilers these days automatically initialize default data types, but it's not something to rely on.