Add hillyness
parent
d65828f3d7
commit
310a681bbb
|
@ -1 +1 @@
|
|||
Subproject commit a6c5dd9faf12ac38b1868c7ad742947a7dbeb905
|
||||
Subproject commit d719d15af18415f17ba5ab9cde0718f2e38717ba
|
|
@ -5,7 +5,7 @@
|
|||
#include "client/client_map.h"
|
||||
#include "client/client_player.h"
|
||||
#include "util.h"
|
||||
#define MAX_BLOCK_REQUESTS 8
|
||||
#define MAX_BLOCK_REQUESTS 4
|
||||
|
||||
struct ClientMap client_map;
|
||||
Client *client;
|
||||
|
|
|
@ -25,6 +25,7 @@ typedef enum
|
|||
SO_VULCANO_HEIGHT,
|
||||
SO_VULCANO_STONE,
|
||||
SO_VULCANO_CRATER_TOP,
|
||||
SO_HILLYNESS,
|
||||
} SeedOffset;
|
||||
|
||||
extern s32 seed;
|
||||
|
|
|
@ -32,7 +32,9 @@ void mapgen_generate_block(MapBlock *block, List *changed_blocks)
|
|||
for (u8 z = 0; z < MAPBLOCK_SIZE; z++) {
|
||||
v2s32 pos_horizontal = {pos_x, block_node_pos.z + z};
|
||||
|
||||
s32 height = pnoise2d(U32(pos_horizontal.x) / 32.0, U32(pos_horizontal.y) / 32.0, 0.45, 5, seed + SO_HEIGHT) * 16.0 + 32;
|
||||
s32 height = (pnoise2d(U32(pos_horizontal.x) / 32.0, U32(pos_horizontal.y) / 32.0, 0.45, 5, seed + SO_HEIGHT) * 16.0)
|
||||
* (pnoise2d(U32(pos_horizontal.x) / 256.0, U32(pos_horizontal.y) / 256.0, 0.45, 5, seed + SO_HILLYNESS) * 0.5 + 0.5)
|
||||
+ 32;
|
||||
|
||||
f64 factor;
|
||||
Biome biome = get_biome(pos_horizontal, &factor);
|
||||
|
|
Loading…
Reference in New Issue