CleverRaven/Cataclysm-DDA — pull request #7402 by BevapDin (2014-04-25 12:25:34+00:00)
Title: Remove indirection & bugfix

- Replaces `g->m.` with an implicit `this->`. If one calles `somemap.generate_lightmap()` (or `build_map_cache`) they don't want this to happen on the main map, but on `somemap`.

- Add a check in `map::add_field` whether this is the main game map (`g->m`) or not. Only harm the player if this is the main map (and not when it's just a tinymap for mapgen).

The second commit fixes this bug: Sometimes when the games start you'll get the message "You're covered in webs!" - I think this is because the player coordinates are initialized to (0,0), than the map loads (game.cpp: 574) which triggers mapgen, which creates several tinymaps. It puts the webs from a nearby forest spider thing onto one of them (`add_field`).

If a web lands on (0,0) (0,0 in the tinymap, this might be at (24,24) or (48,24) or (48,0) in the main map), the map thinks it's on top of the player and calls `step_in_field` which creates the above message.