g_settings.setDefault("fast_move", "false");
g_settings.setDefault("invert_mouse", "false");
g_settings.setDefault("enable_farmesh", "false");
+ g_settings.setDefault("farmesh_trees", "true");
+ g_settings.setDefault("farmesh_distance", "40");
g_settings.setDefault("enable_clouds", "true");
g_settings.setDefault("invisible_stone", "false");
m_box = core::aabbox3d<f32>(-BS*1000000,-BS*31000,-BS*1000000,
BS*1000000,BS*31000,BS*1000000);
+ trees = g_settings.getBool("farmesh_trees");
}
FarMesh::~FarMesh()
}
else
{
- /*// Trees if there are over 0.01 trees per MapNode
- if(tree_amount_avg > 0.01)
+ // Trees if there are over 0.01 trees per MapNode
+ if(trees && tree_amount_avg > 0.01)
c = video::SColor(255,50,128,50);
else
- c = video::SColor(255,107,134,51);*/
- c = video::SColor(255,107,134,51);
+ c = video::SColor(255,107,134,51);
ground_is_mud = true;
}
}
video::EVT_STANDARD, scene::EPT_TRIANGLES, video::EIT_16BIT);
// Add some trees if appropriate
- if(tree_amount_avg >= 0.0065 && steepness < 1.4
+ if(trees && tree_amount_avg >= 0.0065 && steepness < 1.4
&& ground_is_mud == true)
{
driver->setMaterial(m_materials[1]);
m_time += dtime;
}
-void FarMesh::update(v2f camera_p, float brightness, s16 render_range)
+void FarMesh::update(v2f camera_p, float brightness)
{
m_camera_pos = camera_p;
m_brightness = brightness;
- m_render_range = render_range;
+ m_render_range = g_settings.getS16("farmesh_distance")*10;
}
*/
if(farmesh)
{
- farmesh_range = draw_control.wanted_range * 10;
- if(draw_control.range_all && farmesh_range < 500)
- farmesh_range = 500;
- if(farmesh_range > 1000)
- farmesh_range = 1000;
-
farmesh->step(dtime);
farmesh->update(v2f(player_position.X, player_position.Z),
- 0.05+brightness*0.95, farmesh_range);
+ 0.05+brightness*0.95);
}
// Store brightness value