Tweaked clouds a bit
authorPerttu Ahola <celeron55@gmail.com>
Fri, 29 Apr 2011 13:39:47 +0000 (16:39 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 29 Apr 2011 13:39:47 +0000 (16:39 +0300)
src/clouds.cpp
src/game.cpp

index 20a1c12dba72b3583cba67443749cfe94a9aeb42..1b34bf8e0566d357f6c12330d98322dd1db70acf 100644 (file)
@@ -119,11 +119,11 @@ void Clouds::render()
 
                v2f p0 = v2f(xi,zi)*cloud_size + world_center_of_drawing_in_noise_f;
                
-               double noise = noise2d_perlin(
-                               (float)p_in_noise_i.X*cloud_size/BS/100,
-                               (float)p_in_noise_i.Y*cloud_size/BS/100,
-                               m_seed, 3, 0.5);
-               if(noise < 0)
+               double noise = noise2d_perlin_abs(
+                               (float)p_in_noise_i.X*cloud_size/BS/200,
+                               (float)p_in_noise_i.Y*cloud_size/BS/200,
+                               m_seed, 3, 0.4);
+               if(noise < 0.8)
                        continue;
                
                v2f p1 = p0 + v2f(1,1)*cloud_size;
index 21d960db0c552dc88c353d8d2aadcbbb3638a5e3..8981638a84c29b650b7e16759fe639438c8b7fa5 100644 (file)
@@ -760,7 +760,7 @@ void the_game(
        //float cloud_height = BS*55;
        //float cloud_height = BS*20;
        Clouds *clouds = new Clouds(smgr->getRootSceneNode(), smgr, -1,
-                       cloud_height, 0);
+                       cloud_height, time(0));
 
        /*
                Move into game