minetest/minetest — pull request #744 by sweetbomber (2013-05-30 16:42:55+00:00)
Title: Improved (re)spawn

I tried to improve the spawning procedure a little bit.
Previous implementation:
- Had a hard-limit of height 6 above water level;
- The ground level was calculated based only on map generator noise functions

This led to two things:
- Player would never spawn in small hills
- If the spawning zone was modified after the mapgen, this could lead to spawning mid-air

Now it uses the node data to inspect the height of a certain 2d point (searches near the original map-gen terrain height).
The maximum spawning height is now selected in max_spawn_height setting.

And additionally, it loads the candidate bock into memory before performing the spawn. This can also be switched in cache_block_before_spawn setting.

I know that spawning is almost irrelevant, but I tought it would polish the game a little bit.

sweetbomber