CleverRaven/Cataclysm-DDA — pull request #5680 by BevapDin (2014-01-23 16:06:20+00:00)
Title: Access overmap terrain by global coordinates, continues #5619

I reformatted game::draw_minimap. It currently does not include NPCs or vehicles with tracker (as does the overmap view). Should I add this?

The mission target is now a global overmap terrain coordinate. Some missions may already create targets on a another overmap, but not all.

This fixes a bug with NPCs:

`npc::goalx` would be set to the result of `overmap::find_closest`, which is an overmap terrain coordinate. It later gets compared to `npc::mapx` which is a submap position. If the npc is in the lower half of the overmap (mapx >= OMAPX), it will always walk upwards because goalx is always < OMAP. The parameter for find_closest was mapx, which is also wrong as find_closest requires an overmap coordinate. That makes the goal closest to the wrong center.

I fixed this and made `npc::goal` (a tripoint) instead of three members (goalx, goaly, goalz). That goal is now a global overmap terrain coordinate, too. That might be the reason why all NPCs, that I encountered moved north-east, never somewhere else.

`overmap::find_closest` is now completely moved to `overmapbuffer`.

In the overmap view, while searching for terrain, the blinking has been re-enabled, I accidentally removed that in the previous PR.

TODO:
- (next step) load npcs from through the overmapbuffer to include npcs that are near, but on another overmap
- vehicle trackers
- access radio towers across overmap borders