mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Math mapgen fix, ip show on connect, pathfinder segfault fix
This commit is contained in:
parent
75b8c13b00
commit
f764297be2
7 changed files with 21 additions and 34 deletions
|
@ -145,7 +145,7 @@ double sphere(double x, double y, double z, double d, int ITR = 1) {
|
|||
}
|
||||
|
||||
|
||||
//////////////////////// Mapgen Singlenode parameter read/write
|
||||
//////////////////////// Mapgen Math parameter read/write
|
||||
|
||||
bool MapgenMathParams::readParams(Settings *settings) {
|
||||
//params = settings->getJson("mg_math");
|
||||
|
@ -171,6 +171,8 @@ void MapgenMathParams::writeParams(Settings *settings) {
|
|||
|
||||
MapgenMath::MapgenMath(int mapgenid, MapgenMathParams *params_, EmergeManager *emerge) : MapgenV7(mapgenid, params_, emerge) {
|
||||
mg_params = params_;
|
||||
this->lighting = 0;
|
||||
this->ridges = 0;
|
||||
|
||||
Json::Value & params = mg_params->params;
|
||||
invert = params["invert"].empty() ? 1 : params["invert"].asBool(); //params["invert"].empty()?1:params["invert"].asBool();
|
||||
|
@ -238,7 +240,7 @@ MapgenMath::~MapgenMath() {
|
|||
|
||||
void MapgenMath::generateTerrain() {
|
||||
|
||||
MapNode n_air(CONTENT_AIR), n_water_source(c_water_source, LIGHT_SUN);
|
||||
MapNode n_air(CONTENT_AIR, LIGHT_SUN), n_water_source(c_water_source, LIGHT_SUN);
|
||||
MapNode n_stone(c_stone, LIGHT_SUN);
|
||||
u32 index = 0;
|
||||
v3s16 em = vm->m_area.getExtent();
|
||||
|
@ -263,6 +265,7 @@ void MapgenMath::generateTerrain() {
|
|||
if (vm->m_data[i].getContent() == CONTENT_IGNORE)
|
||||
vm->m_data[i] = (y > water_level + biome->filler_height) ?
|
||||
MapNode(biome->c_filler) : n_stone;
|
||||
// vm->m_data[i] = n_stone;
|
||||
} else if (y <= water_level) {
|
||||
vm->m_data[i] = n_water_source;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue