- update ramdom timesof day random with random (H*M*S)

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

Former-commit-id: 2a37293317e600d23fe16b3e4d3ec40053cf588b
Former-commit-id: 62792e9ce13f75fa1adbcc122b21cfa0bd5e4b97
This commit is contained in:
torcs-ng 2012-01-22 16:25:45 +00:00
parent e662efbaad
commit a2f06fc427

View file

@ -246,14 +246,9 @@ reTrackInitTimeOfDay(void)
GfLogDebug(" Track-defined time of day\n");
break;
case RM_IND_TIME_RANDOM:
{
int heure;
srand(time(NULL));
heure = rand()%(23);
trackLocal->timeofday = heure * 3600.0f + 0 * 60 + 0;
case RM_IND_TIME_RANDOM:
trackLocal->timeofday = rand() % (24*60*60);
break;
}
default:
trackLocal->timeofday = 15 * 3600 + 0 * 60 + 0; // 15:00:00