8 changes: 1 addition & 7 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1642,8 +1642,6 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
Hud hud(driver, smgr, guienv, font, text_height,
gamedef, player, &local_inventory);

bool use_weather = g_settings->getBool("weather");

core::stringw str = L"Minetest [";
str += driver->getName();
str += "]";
Expand Down Expand Up @@ -3111,8 +3109,6 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
fog_range = 100000*BS;
else {
fog_range = draw_control.wanted_range*BS + 0.0*MAP_BLOCKSIZE*BS;
if(use_weather)
fog_range *= (1.5 - 1.4*(float)client.getEnv().getClientMap().getHumidity(pos_i)/100);
fog_range = MYMIN(fog_range, (draw_control.farthest_drawn+20)*BS);
fog_range *= 0.9;
}
Expand Down Expand Up @@ -3262,9 +3258,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
<<", "<<(player_position.Y/BS)
<<", "<<(player_position.Z/BS)
<<") (yaw="<<(wrapDegrees_0_360(camera_yaw))
<<") (t="<<client.getEnv().getClientMap().getHeat(pos_i)
<<"C, h="<<client.getEnv().getClientMap().getHumidity(pos_i)
<<"%) (seed = "<<((u64)client.getMapSeed())
<<") (seed = "<<((u64)client.getMapSeed())
<<")";
guitext2->setText(narrow_to_wide(os.str()).c_str());
guitext2->setVisible(true);
Expand Down
475 changes: 0 additions & 475 deletions src/map.cpp

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions src/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ class Map /*: public NodeContainer*/
virtual void PrintInfo(std::ostream &out);

void transformLiquids(std::map<v3s16, MapBlock*> & modified_blocks);
void transformLiquidsFinite(std::map<v3s16, MapBlock*> & modified_blocks);

/*
Node metadata
Expand Down Expand Up @@ -351,9 +350,6 @@ class Map /*: public NodeContainer*/
void transforming_liquid_add(v3s16 p);
s32 transforming_liquid_size();

virtual s16 getHeat(v3s16 p);
virtual s16 getHumidity(v3s16 p);

protected:
friend class LuaVoxelManip;

Expand Down Expand Up @@ -504,9 +500,6 @@ class ServerMap : public Map
u64 getSeed();
s16 getWaterLevel();

virtual s16 updateBlockHeat(ServerEnvironment *env, v3s16 p, MapBlock *block = NULL);
virtual s16 updateBlockHumidity(ServerEnvironment *env, v3s16 p, MapBlock *block = NULL);

private:
// Emerge manager
EmergeManager *m_emerge;
Expand Down
12 changes: 4 additions & 8 deletions src/mapblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/

MapBlock::MapBlock(Map *parent, v3s16 pos, IGameDef *gamedef, bool dummy):
heat(0),
humidity(0),
heat_last_update(0),
humidity_last_update(0),
m_parent(parent),
m_pos(pos),
m_gamedef(gamedef),
Expand Down Expand Up @@ -647,8 +643,8 @@ void MapBlock::serializeNetworkSpecific(std::ostream &os, u16 net_proto_version)
if(net_proto_version >= 21){
int version = 1;
writeU8(os, version);
writeF1000(os, heat);
writeF1000(os, humidity);
writeF1000(os, 0); // deprecated heat
writeF1000(os, 0); // deprecated humidity
}
}

Expand Down Expand Up @@ -764,8 +760,8 @@ void MapBlock::deSerializeNetworkSpecific(std::istream &is)
//if(version != 1)
// throw SerializationError("unsupported MapBlock version");
if(version >= 1) {
heat = readF1000(is);
humidity = readF1000(is);
readF1000(is); // deprecated heat
readF1000(is); // deprecated humidity
}
}
catch(SerializationError &e)
Expand Down
5 changes: 0 additions & 5 deletions src/mapblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,6 @@ class MapBlock /*: public NodeContainer*/
NodeMetadataList m_node_metadata;
NodeTimerList m_node_timers;
StaticObjectList m_static_objects;

s16 heat;
s16 humidity;
u32 heat_last_update;
u32 humidity_last_update;

private:
/*
Expand Down
6 changes: 2 additions & 4 deletions src/mapgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,6 @@ void Mapgen::updateHeightmap(v3s16 nmin, v3s16 nmax) {
void Mapgen::updateLiquid(UniqueQueue<v3s16> *trans_liquid, v3s16 nmin, v3s16 nmax) {
bool isliquid, wasliquid, rare;
v3s16 em = vm->m_area.getExtent();
rare = g_settings->getBool("liquid_finite");
int rarecnt = 0;

for (s16 z = nmin.Z; z <= nmax.Z; z++) {
for (s16 x = nmin.X; x <= nmax.X; x++) {
Expand All @@ -990,8 +988,8 @@ void Mapgen::updateLiquid(UniqueQueue<v3s16> *trans_liquid, v3s16 nmin, v3s16 nm
for (s16 y = nmax.Y; y >= nmin.Y; y--) {
isliquid = ndef->get(vm->m_data[i]).isLiquid();

// there was a change between liquid and nonliquid, add to queue. no need to add every with liquid_finite
if (isliquid != wasliquid && (!rare || !(rarecnt++ % 36)))
// there was a change between liquid and nonliquid, add to queue.
if (isliquid != wasliquid)
trans_liquid->push_back(v3s16(x, y, z));

wasliquid = isliquid;
Expand Down
25 changes: 0 additions & 25 deletions src/script/lua_api/l_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,6 @@ int ModApiEnvMod::l_spawn_tree(lua_State *L)
return 1;
}


// minetest.transforming_liquid_add(pos)
int ModApiEnvMod::l_transforming_liquid_add(lua_State *L)
{
Expand All @@ -776,28 +775,6 @@ int ModApiEnvMod::l_transforming_liquid_add(lua_State *L)
return 1;
}

// minetest.get_heat(pos)
// pos = {x=num, y=num, z=num}
int ModApiEnvMod::l_get_heat(lua_State *L)
{
GET_ENV_PTR;

v3s16 pos = read_v3s16(L, 1);
lua_pushnumber(L, env->getServerMap().updateBlockHeat(env, pos));
return 1;
}

// minetest.get_humidity(pos)
// pos = {x=num, y=num, z=num}
int ModApiEnvMod::l_get_humidity(lua_State *L)
{
GET_ENV_PTR;

v3s16 pos = read_v3s16(L, 1);
lua_pushnumber(L, env->getServerMap().updateBlockHumidity(env, pos));
return 1;
}

// minetest.forceload_block(blockpos)
// blockpos = {x=num, y=num, z=num}
int ModApiEnvMod::l_forceload_block(lua_State *L)
Expand Down Expand Up @@ -855,8 +832,6 @@ void ModApiEnvMod::Initialize(lua_State *L, int top)
API_FCT(find_path);
API_FCT(line_of_sight);
API_FCT(transforming_liquid_add);
API_FCT(get_heat);
API_FCT(get_humidity);
API_FCT(forceload_block);
API_FCT(forceload_free_block);
}
3 changes: 0 additions & 3 deletions src/script/lua_api/l_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ class ModApiEnvMod : public ModApiBase {
// minetest.transforming_liquid_add(pos)
static int l_transforming_liquid_add(lua_State *L);

static int l_get_heat(lua_State *L);
static int l_get_humidity(lua_State *L);

// minetest.forceload_block(blockpos)
// forceloads a block
static int l_forceload_block(lua_State *L);
Expand Down
1 change: 0 additions & 1 deletion src/serverlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ void sendAnnounce(std::string action, const std::vector<std::string> & clients_n
server["dedicated"] = g_settings->get("server_dedicated");
server["privs"] = g_settings->get("default_privs");
server["rollback"] = g_settings->getBool("enable_rollback_recording");
server["liquid_finite"] = g_settings->getBool("liquid_finite");
server["mapgen"] = g_settings->get("mg_name");
server["can_see_far_names"] = g_settings->getBool("unlimited_player_transfer_distance");
server["mods"] = Json::Value(Json::arrayValue);
Expand Down