Skip to content
Browse files

Merge remote-tracking branch 'c55/master'

Preserve delta-specific stuff.
  • Loading branch information...
2 parents dd9909a + bdb66ac commit 1e12a73579b745e0086f9b1f43065acc40271cd9 @Oblomov committed Aug 8, 2011
Showing with 19 additions and 42 deletions.
  1. +1 −30 .hgtags
  2. +0 −2 src/defaultsettings.cpp
  3. +7 −7 src/farmesh.cpp
  4. +1 −2 src/farmesh.h
  5. +7 −1 src/game.cpp
  6. +3 −0 src/main.cpp
View
31 .hgtags
@@ -1,30 +1 @@
-c37bcfd89dd627fdb131ae3f77fcaab02721bf76 working
-69547bd6be420eb40f55524fd2131cbbaa2e0e29 110107195706-exp
-e3c3c8e27bbc8c9b61710517a78944deb1c61696 110211211322
-23880c78e40c50ad54fcd8844510f7a423b37f2a 110212200513
-20c49c98c92a62df457b773c562df41d4167492b 110214175330
-10be2b71f965585af90af96903e83b4ddff52bf9 20110424_0
-9b05d4bfee9312aef4182fa6f63b4237368cec34 0.2.20110529_0
-6fa0a8b40406aa567f8fa84b5e2045a7e3762c1d 0.2.20110529_1
-cf6dd618ef0b7514c81ae87749733b5a328fc763 0.2.20110529_2
-96efc17b4cd92aacbe947b520a6ba91727d42f03 0.2.20110602_0
-0000000000000000000000000000000000000000 0.2.20110602_0
-6f17cd3f6c5481e6abc906fc441980c764632cbc 0.2.20110602_0
-dd08a9b5cb84d55b7576bb3fde3068dd263bc3bc 0.2.20110618_0_dev
-25aa2021937f7a8b36808390983cebbc16ae6965 0.2.20110704_0
-25aa2021937f7a8b36808390983cebbc16ae6965 0.2.20110704_0
-0000000000000000000000000000000000000000 0.2.20110704_0
-0000000000000000000000000000000000000000 0.2.20110704_0
-65263ec55caf526e3f3e0bdc6657ce42daee46bc 0.2.20110704_0
-06c62112b503e746d5d8cc40f951974447d590b7 0.2.20110731_0
-705a7e95b8710c8cada5524d8c7bb658f4b710d9 0.2.20110731_1
-4a6cf9491306988b24c79438ee6398885c432fce 0.2.20110731_2
-4a6cf9491306988b24c79438ee6398885c432fce 0.2.20110731_2
-0000000000000000000000000000000000000000 0.2.20110731_2
-0000000000000000000000000000000000000000 0.2.20110731_2
-8ad16fbce9a4da45b2552ad8b400a5a127722acc 0.2.20110731_2
-c87e28deaabf4a776c261b3a09b6bf5ea3e04abf 0.2.20110731_3
-c87e28deaabf4a776c261b3a09b6bf5ea3e04abf 0.2.20110731_3
-0000000000000000000000000000000000000000 0.2.20110731_3
-0000000000000000000000000000000000000000 0.2.20110731_3
-b277d01700f640b0ba2684a8ead3b7169a4a8175 0.2.20110731_3
+a519d683251105654d2a146ae7b91d3850b6504c 0.2.20110731_3
View
2 src/defaultsettings.cpp
@@ -70,8 +70,6 @@ void set_default_settings()
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");
g_settings.setDefault("screenshot_path", ".");
View
14 src/farmesh.cpp
@@ -70,7 +70,6 @@ FarMesh::FarMesh(
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()
@@ -314,11 +313,12 @@ void FarMesh::render()
}
else
{
- // Trees if there are over 0.01 trees per MapNode
- if(trees && tree_amount_avg > 0.01)
+ /*// Trees if there are over 0.01 trees per MapNode
+ if(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;
}
}
@@ -351,7 +351,7 @@ void FarMesh::render()
video::EVT_STANDARD, scene::EPT_TRIANGLES, video::EIT_16BIT);
// Add some trees if appropriate
- if(trees && tree_amount_avg >= 0.0065 && steepness < 1.4
+ if(tree_amount_avg >= 0.0065 && steepness < 1.4
&& ground_is_mud == true)
{
driver->setMaterial(m_materials[1]);
@@ -404,11 +404,11 @@ void FarMesh::step(float dtime)
m_time += dtime;
}
-void FarMesh::update(v2f camera_p, float brightness)
+void FarMesh::update(v2f camera_p, float brightness, s16 render_range)
{
m_camera_pos = camera_p;
m_brightness = brightness;
- m_render_range = g_settings.getS16("farmesh_distance")*10;
+ m_render_range = render_range;
}
View
3 src/farmesh.h
@@ -67,7 +67,7 @@ class FarMesh : public scene::ISceneNode
void step(float dtime);
- void update(v2f camera_p, float brightness);
+ void update(v2f camera_p, float brightness, s16 render_range);
private:
video::SMaterial m_materials[FARMESH_MATERIAL_COUNT];
@@ -79,7 +79,6 @@ class FarMesh : public scene::ISceneNode
float m_time;
Client *m_client;
s16 m_render_range;
- bool trees;
};
#endif
View
8 src/game.cpp
@@ -2005,9 +2005,15 @@ void the_game(
*/
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);
+ 0.05+brightness*0.95, farmesh_range);
}
// Store brightness value
View
3 src/main.cpp
@@ -367,6 +367,9 @@ TODO: Merge bahamada's audio stuff (clean patch available)
TODO: Move content_features to mapnode_content_features.{h,cpp} or so
+TODO: Fix item use() stuff; dropping a stack of cooked rats and eating
+ it gives 3 hearts and consumes all the rats.
+
Making it more portable:
------------------------

0 comments on commit 1e12a73

Please sign in to comment.
Something went wrong with that request. Please try again.