Fix bug with race config reading weather
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2836 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: c79cc68390d9510778e4b198f4d9356152e1031b Former-commit-id: cc28e51091cb27d67246463ca27d0faf80625f09
This commit is contained in:
parent
c7e3362a83
commit
047945fce7
2 changed files with 2 additions and 6 deletions
|
@ -51,10 +51,6 @@ static int SkyDomeValueIndex = 0;
|
|||
static int DynamicTimeOptionId;
|
||||
static int DynamicTimeOptionValue = 0;
|
||||
|
||||
|
||||
//static int RainDensityOptionId;
|
||||
//static int RainDensityValueIndex = 0;
|
||||
|
||||
static const int SkyDomeSizeValues[] = {0, 12000, 20000, 40000, 80000};
|
||||
static const int NbSkyDomeValues = sizeof(SkyDomeSizeValues) / sizeof(SkyDomeSizeValues[0]);
|
||||
//static const int RainDensityValues[] = {0, 100, 200, 300};
|
||||
|
|
|
@ -232,7 +232,7 @@ rmrpValidate(void * /* dummy */)
|
|||
GfParmSetNum(rp->param, rp->title, RM_ATTR_DISTANCE, "km", rmrpDistance);
|
||||
GfParmSetNum(rp->param, rp->title, RM_ATTR_LAPS, (char*)NULL, rmrpLaps);
|
||||
GfParmSetNum(rp->param, rp->title, RM_ATTR_SESSIONTIME, "s", (tdble)rmrpSessionTime);
|
||||
GfParmSetNum(rp->param, rp->title, RM_ATTR_WEATHER, NULL, rmrpWeather + 1); //TODO: delete this line
|
||||
//GfParmSetNum(rp->param, rp->title, RM_ATTR_WEATHER, NULL, rmrpWeather + 1); //TODO: delete this line
|
||||
GfParmSetNum(rp->param, rp->title, RM_ATTR_WEATHER_RAIN, "l/m2/h", WeatherValues[rmrpWeather].rain);
|
||||
switch( WeatherValues[rmrpWeather ].clouds )
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ RmRaceParamMenu(void *vrp)
|
|||
{
|
||||
rmrpWeather = xx;
|
||||
}
|
||||
else if( fabs( WeatherValues[ xx ].rain - GfParmGetNum(rp->param, rp->title, RM_ATTR_WEATHER_RAIN, "l/m2/h", 0.0f ) ) <
|
||||
if( fabs( WeatherValues[ xx ].rain - GfParmGetNum(rp->param, rp->title, RM_ATTR_WEATHER_RAIN, "l/m2/h", 0.0f ) ) ==
|
||||
fabs( WeatherValues[ rmrpWeather ].rain - GfParmGetNum(rp->param, rp->title, RM_ATTR_WEATHER_RAIN, "l/m2/h", 0.0f ) ) )
|
||||
{
|
||||
//Rain is equal far off, look if we have a match in the cloud type
|
||||
|
|
Loading…
Reference in a new issue