Re #377 : fixes the frame rate regression (was silly mistake in r3483 making the sky dome always active)

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

Former-commit-id: bc498b96f7f398e0ac773febdfd888859413720a
Former-commit-id: 2d788b767bb53feece74efa00cc85a61477f2846
This commit is contained in:
pouillot 2011-04-20 20:56:59 +00:00
parent bbd4ceb711
commit f99fc6df30

View file

@ -392,7 +392,7 @@ grLoadBackground(void)
// Load graphic options for the background.
grSkyDomeDistance =
(unsigned)GfParmGetNum(grHandle, GR_SCT_GRAPHIC, GR_ATT_SKYDOMEDISTANCE, (char*)NULL, grSkyDomeDistance);
if (grSkyDomeDistance < grSkyDomeDistThresh)
if (grSkyDomeDistance > 0 && grSkyDomeDistance < grSkyDomeDistThresh)
grSkyDomeDistance = grSkyDomeDistThresh; // If user enabled it (>0), must be at least the threshold.
grDynamicTime = grSkyDomeDistance > 0 && strcmp(GfParmGetStr(grHandle, GR_SCT_GRAPHIC, GR_ATT_DYNAMICTIME, GR_ATT_DYNAMICTIME_DISABLED), GR_ATT_DYNAMICTIME_ENABLED) == 0;