spawn players at terrain height level

This commit is contained in:
p2r3
2025-08-12 13:07:42 +03:00
parent d2409ec0f5
commit 3b9ca68a57
4 changed files with 21 additions and 7 deletions

View File

@@ -7,6 +7,7 @@
#include "globals.h"
#include "tools.h"
#include "registries.h"
#include "worldgen.h"
uint32_t getHash (const void *data, size_t len) {
const uint8_t *bytes = data;
@@ -50,8 +51,6 @@ int getCornerHeight (uint32_t hash) {
}
#define chunk_size 8
int interpolate (int a, int b, int c, int d, int x, int z) {
int top = a * (chunk_size - x) + b * x;
int bottom = c * (chunk_size - x) + d * x;