Increasing sun_radius to very high value (400000) will make oolite calculating sun position from main planet to take almost forever.
So "do {} while" code in Universe.m needs some improvement.
sun_radius vs distance between main planet and sun
Moderators: winston, another_commander, Getafix
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: sun_radius vs distance between main planet and sun
This large sun diameter took forever with me so I had even to quit Oolite with this value. This is easy fixed by putting a sun_distance += sun_radius; immediately before the do-while loop. This way you don't change the random numbers and the sun-planet vector stays the same. (I checked it in game)metri wrote:Increasing sun_radius to very high value (400000) will make oolite calculating sun position from main planet to take almost forever.
So "do {} while" code in Universe.m needs some improvement.
But this fix will putt all suns one diameter further away. So it also needs a check to only do this when the sun diameter is defined larger that normal values. I'll look what values qualify so it does not change distances in a unmodified game.
EDIT: fixed now, added:
if(sun_radius > 250000) sun_distance += sun_radius;
241920 m is the highest possible in-game generated sun_radius. Using a higher value won't change old distances but will put big suns one solar diameter further away and by this avoiding an endless looping while statement. Thanks for spotting metri.
UPS-Courier & DeepSpacePirates & others at the box and some older versions