diff options
author | Wuzzy <Wuzzy2@mail.ru> | 2021-04-05 17:18:45 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-04-09 22:33:45 +0200 |
commit | e89e6c8380ba5dc865f94b1cb4e6fd7e96369436 (patch) | |
tree | 44f3fcc5456fd66c417962e2403daf9aaa10a66d /src/client | |
parent | 57218aa9d1cdfcbb101987591b60beb6ab766ca9 (diff) | |
download | minetest-e89e6c8380ba5dc865f94b1cb4e6fd7e96369436.tar.gz minetest-e89e6c8380ba5dc865f94b1cb4e6fd7e96369436.tar.bz2 minetest-e89e6c8380ba5dc865f94b1cb4e6fd7e96369436.zip |
Don't reseed stars when changing star count
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/sky.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/sky.cpp b/src/client/sky.cpp index 44c8f1574..46a3f2621 100644 --- a/src/client/sky.cpp +++ b/src/client/sky.cpp @@ -57,6 +57,8 @@ Sky::Sky(s32 id, ITextureSource *tsrc, IShaderSource *ssrc) : scene::ISceneNode(RenderingEngine::get_scene_manager()->getRootSceneNode(), RenderingEngine::get_scene_manager(), id) { + m_seed = (u64)myrand() << 32 | myrand(); + setAutomaticCulling(scene::EAC_OFF); m_box.MaxEdge.set(0, 0, 0); m_box.MinEdge.set(0, 0, 0); @@ -833,7 +835,6 @@ void Sky::setStarCount(u16 star_count, bool force_update) // Allow force updating star count at game init. if (m_star_params.count != star_count || force_update) { m_star_params.count = star_count; - m_seed = (u64)myrand() << 32 | myrand(); updateStars(); } } |