fix bug moon position bad initialized

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3509 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3d2010287c9888d529e9f7655b364c6916d800f4
Former-commit-id: d68e008d8da9bb4303cfc424dd257d1324debb0d
This commit is contained in:
torcs-ng 2011-04-24 18:37:25 +00:00
parent f99fc6df30
commit 981dfb168f

View file

@ -230,10 +230,10 @@ grInitBackground(void)
// Add the Moon
TheCelestBodies[eCBMoon] = TheSky->addBody ( "data/textures/moon.rgba",NULL, (2500 / div), grSkyDomeDistance);
if ( grSunDeclination < 0 )
if ( grSunDeclination > 180 )
grMoonDeclination = 3.0 + (rand() % 40);
else
grMoonDeclination = -(rand() % 180) + 90;
grMoonDeclination = (rand() % 270);
const float moonAscension = (float)(rand() % 359);