1
0
miroir de https://github.com/luanti-org/luanti.git synchronisé 2025-12-14 19:18:29 +01:00

Document the deprecation of hardcoded cave liquids (#8692)

Cette révision appartient à :
Paramat
2019-07-20 01:03:52 +01:00
révisé par GitHub
Parent a6f7848352
révision 76824bac9f
4 fichiers modifiés avec 14 ajouts et 1 suppressions

Voir le fichier

@@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mg_biome.h"
#include "cavegen.h"
// TODO Remove this. Cave liquids are now defined and located using biome definitions
static NoiseParams nparams_caveliquids(0, 1, v3f(150.0, 150.0, 150.0), 776, 3, 0.6, 2.0);
@@ -526,7 +527,9 @@ void CavesRandomWalk::carveRoute(v3f vec, float f, bool randomize_xz)
if (use_biome_liquid) {
liquidnode = c_biome_liquid;
} else {
// If cave liquid not defined by biome, fallback to old hardcoded behaviour
// TODO remove this. Cave liquids are now defined and located using biome
// definitions.
// If cave liquid not defined by biome, fallback to old hardcoded behaviour.
float nval = NoisePerlin3D(np_caveliquids, startp.X,
startp.Y, startp.Z, seed);
liquidnode = (nval < 0.40f && node_max.Y < lava_depth) ?

Voir le fichier

@@ -119,6 +119,8 @@ public:
// configurable parameters
s32 seed;
int water_level;
// TODO 'lava_depth' and 'np_caveliquids' are deprecated and should be removed.
// Cave liquids are now defined and located using biome definitions.
int lava_depth;
NoiseParams *np_caveliquids;

Voir le fichier

@@ -278,5 +278,7 @@ protected:
float cavern_limit;
float cavern_taper;
float cavern_threshold;
// TODO 'lava_depth' is deprecated and should be removed. Cave liquids are
// now defined and located using biome definitions.
int lava_depth;
};