HomeWildfire Games

Fix rmgen2 SimpleObject and RandomObject ignoring the 3 invalid map border…

Description

Fix rmgen2 SimpleObject and RandomObject ignoring the 3 invalid map border tiles.
Let validT take the responsability to account for the actually valid region of map tiles instead of each caller.

Fixes #4814, refs #4636, #4796

Details

Event Timeline

elexis added inline comments.Oct 11 2017, 2:58 PM
/ps/trunk/binaries/data/mods/public/maps/random/rmgen2/gaia.js
878

Subtracting the MAP_BORDER_WIDTH from the number of players wasn't right

It would be better if we had a reachableTile (returns false for the 3 impassable map border tiles) and paintableTile function (returns true on the map border).

elexis added inline comments.Nov 11 2017, 3:29 PM
/ps/trunk/binaries/data/mods/public/maps/random/rmgen/placer.js
358

Notice that this unchanged line is the actual behavior change of this commit, as the default distance is now those 3 tiles instead of 0.

446

same here.