More verbose comments, removed an obsolote message.

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

Former-commit-id: 63748360f62684d645beed185f93b45192d7c12a
Former-commit-id: dc9fc017fa243b42353d11000308da4f203250a1
This commit is contained in:
kakukri 2012-04-01 18:52:18 +00:00
parent feeea91c0f
commit 1090aaee1f

View file

@ -448,7 +448,17 @@ RePreRace(void)
snprintf(path, sizeof(path), "%s/%s/%s", ReInfo->track->name, RE_SECT_RESULTS, raceName);
GfParmListClean(results, path);
// Drivers starting order
// Drivers starting order
// The starting order is decided here,
// then car indexes are stored in ReStartingOrderIdx, in the starting order.
// The actual grid is assembled in ReRaceStart().
// In case of a race, when all cars start at the same time,
// cars are simply added to the starting list in the order stored in ReStartingOrderIdx.
// If only one car is at the track at a time (not timed session qualifying or practice),
// the race is divided into many sub-races.
// For a sub-race, only the car pointed by results/RE_ATTR_CUR_DRIVER
// is added to the starting grid.
// RE_ATTR_CUR_DRIVER is refreshed after every sub-race in ReRaceEnd().
ReCurrDriverNr = 0;
int nCars = GfParmGetEltNb(params, RM_SECT_DRIVERS);
GfParmListClean(params, RM_SECT_DRIVERS_RACING);
@ -826,8 +836,6 @@ ReRaceStart(void)
(int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, 1);
if (nCurrDrvInd == -1)
return RM_ERROR;
if (nCurrDrvInd == 1)
ReUI().addLoadingMessage("Preparing Starting Grid ...");
// Propagate competitor drivers info to the real race starting grid
snprintf(path, sizeof(path), "%s/%d", RM_SECT_DRIVERS, nCurrDrvInd);
@ -847,6 +855,7 @@ ReRaceStart(void)
}
else
{
// For a race, add cars to the starting grid in the order stored in ReStartingOrderIdx.
ReUI().addLoadingMessage("Preparing Starting Grid ...");
int maxCars = (int)GfParmGetNum(params, sessionName, RM_ATTR_MAX_DRV, NULL, 100);