Remove hardcoded maximal distance from an observer to stars

Stars close that the distance are rendered as solar systems (e.g. with
their planets, orbits, Oort belts).
pull/140/head
Hleb Valoshka 2018-11-22 19:58:23 +03:00
parent fe4bf3f144
commit e75123bfd0
2 changed files with 2 additions and 2 deletions

View File

@ -2560,7 +2560,7 @@ void Renderer::draw(const Observer& observer,
if ((renderFlags & ShowSSO) != 0)
{
nearStars.clear();
universe.getNearStars(observer.getPosition(), 1.0f, nearStars);
universe.getNearStars(observer.getPosition(), MaxSolarSystemSize, nearStars);
// Set up direct light sources (i.e. just stars at the moment)
setupLightSources(nearStars, observer.getPosition(), now, lightSourceList, renderFlags);

View File

@ -1207,6 +1207,6 @@ Universe::getNearStars(const UniversalCoord& position,
vector<const Star*>& nearStars) const
{
Vector3f pos = position.toLy().cast<float>();
NearStarFinder finder(1.0f, nearStars);
NearStarFinder finder(maxDistance, nearStars);
starCatalog->findCloseStars(finder, pos, maxDistance);
}