Skip to content

Commit

Permalink
Don't reseed stars when changing star count
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuzzy2 authored and sfan5 committed Apr 9, 2021
1 parent 57218aa commit e89e6c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/sky.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}
}
Expand Down

0 comments on commit e89e6c8

Please sign in to comment.