HomeWildfire Games

Merge InitMap, initTerrain and resetTerrain successors from rP20894.

Description

Merge InitMap, initTerrain and resetTerrain successors from rP20894.

Lets the random map script decide which baseTerrain and baseHeight it wants to use before initializing the map,
rather than painting what is in the JSON file, then changing ones mind and painting something else on top of it.
This cleaner heightmap initialization incidentally addresses the uninitialized border of the heightmap in that commit (excluding the Unknown).

Details

Event Timeline

/ps/trunk/binaries/data/mods/public/maps/random/rmgen/mapgen.js
21

This call should be moved to the RandomMap constructor as soon as the terrain code doesn't rely on an initialized RandomMap object.
If the g_Maps references in the libraries are removed (#4964), then the maps can create the instance directly.
The function can't be removed prior unfortunately apparently.