mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
FindSpawnPos: Let mapgens decide what spawn altitude is suitable
To avoid spawn search failing in new specialised mapgens Increase spawn search range to 4000 nodes Add getSpawnLevelAtPoint() functions to EmergeManager, class Mapgen and all mapgens Remove getGroundLevelAtPoint() functions from all mapgens except mgv6 (possibly to be re-added later in the correct form to return actual ground level) Make mgvalleys flag names consistent with other mapgens Remove now unused 'vertical spawn range' setting
This commit is contained in:
parent
38e7122600
commit
4adbd69a37
19 changed files with 122 additions and 77 deletions
|
@ -30,9 +30,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include "mapgen.h"
|
||||
|
||||
/////////////////// Mapgen Valleys flags
|
||||
#define MG_VALLEYS_ALT_CHILL 0x01
|
||||
#define MG_VALLEYS_HUMID_RIVERS 0x02
|
||||
////////////// Mapgen Valleys flags
|
||||
#define MGVALLEYS_ALT_CHILL 0x01
|
||||
#define MGVALLEYS_HUMID_RIVERS 0x02
|
||||
|
||||
// Feed only one variable into these.
|
||||
#define MYSQUARE(x) (x) * (x)
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
~MapgenValleys();
|
||||
|
||||
virtual void makeChunk(BlockMakeData *data);
|
||||
int getGroundLevelAtPoint(v2s16 p);
|
||||
int getSpawnLevelAtPoint(v2s16 p);
|
||||
|
||||
s16 large_cave_depth;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue