mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add flags and lacunarity as new noise parameters
Add 'absolute value' option to noise map functions Extend persistence modulation to 3D noise Extend 'eased' option to noise2d_perlin* functions Some noise.cpp formatting fixups
This commit is contained in:
parent
638f3a8454
commit
2fd3d52020
16 changed files with 306 additions and 214 deletions
|
@ -608,13 +608,13 @@ int ModApiEnvMod::l_get_perlin_map(lua_State *L)
|
|||
{
|
||||
GET_ENV_PTR;
|
||||
|
||||
NoiseParams *np = read_noiseparams(L, 1);
|
||||
if (!np)
|
||||
NoiseParams np;
|
||||
if (!read_noiseparams(L, 1, &np))
|
||||
return 0;
|
||||
v3s16 size = read_v3s16(L, 2);
|
||||
|
||||
int seed = (int)(env->getServerMap().getSeed());
|
||||
LuaPerlinNoiseMap *n = new LuaPerlinNoiseMap(np, seed, size);
|
||||
LuaPerlinNoiseMap *n = new LuaPerlinNoiseMap(&np, seed, size);
|
||||
*(void **)(lua_newuserdata(L, sizeof(void *))) = n;
|
||||
luaL_getmetatable(L, "PerlinNoiseMap");
|
||||
lua_setmetatable(L, -2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue