forked from speed-dreams/speed-dreams-code
change initialize Moon position at start race
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3487 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: dbaef3c4a585c987e51afdb3555f14acb8f659d9 Former-commit-id: 9ed7ce732dd51ac98a79eae8e8fd5bfe78db7376
This commit is contained in:
parent
2a36dfe2a1
commit
0083b6e6aa
1 changed files with 4 additions and 4 deletions
|
@ -216,7 +216,7 @@ grInitBackground(void)
|
|||
TheSky->build(grSkyDomeDistance, grSkyDomeDistance, NPlanets, APlanetsData, NStars, AStarsData);
|
||||
|
||||
//Add the Sun itself
|
||||
TheCelestBodies[eCBSun] = TheSky->addBody(NULL, "data/textures/halo.rgba", (2500 / div), grSkyDomeDistance, true);
|
||||
TheCelestBodies[eCBSun] = TheSky->addBody(NULL, "data/textures/halo.rgba", (2500 / div), grSkyDomeDistance, true);
|
||||
GLfloat sunAscension = grTrack->local.sunascension;
|
||||
grSunDeclination = (float)(15 * (double)timeOfDay / 3600 - 90.0);
|
||||
|
||||
|
@ -231,11 +231,11 @@ grInitBackground(void)
|
|||
// Add the Moon
|
||||
TheCelestBodies[eCBMoon] = TheSky->addBody ( "data/textures/moon.rgba",NULL, (2500 / div), grSkyDomeDistance);
|
||||
if ( grSunDeclination < 0 )
|
||||
grMoonDeclination = 3.0 + (rand() % 25);
|
||||
grMoonDeclination = 3.0 + (rand() % 40);
|
||||
else
|
||||
grMoonDeclination = -(rand() % 45) + 10;
|
||||
grMoonDeclination = -(rand() % 180) + 90;
|
||||
|
||||
const float moonAscension = (float)(rand() % 240);
|
||||
const float moonAscension = (float)(rand() % 359);
|
||||
|
||||
TheCelestBodies[eCBMoon]->setDeclination ( DEG2RAD(grMoonDeclination) );
|
||||
TheCelestBodies[eCBMoon]->setRightAscension ( DEG2RAD(moonAscension) );
|
||||
|
|
Loading…
Reference in a new issue