Re #313 (Split Windows installer) Fixed Single event races not starting when 1 of the robots is not available

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

Former-commit-id: 15d5d66a7da7459738b23f9cd969c89e509768cf
Former-commit-id: 66a9ecbd20f09638c5b1efd76d7c29a130c82438
This commit is contained in:
pouillot 2011-02-27 15:36:41 +00:00
parent 793d46b67a
commit 92b121a6b4
2 changed files with 15 additions and 4 deletions

View file

@ -760,7 +760,7 @@ ReInitCars(void)
if (GfModLoad(CAR_IDENT, path, ReInfo->modList))
{
GfLogError("Failed to load robot module %s\n", path);
break;
continue;
}
/* Load the racing driver info in the race data structure */

View file

@ -130,6 +130,9 @@ void GfRace::load(GfRaceManager* pRaceMan, void* hparmResults)
// Save the new race manager.
_pPrivate->pRaceMan = pRaceMan;
// Now we should be consistent with the race params (in memory).
_pPrivate->bIsDirty = false;
// Check if usable, and exit if not.
if (!_pPrivate->pRaceMan)
return;
@ -412,6 +415,10 @@ void GfRace::load(GfRaceManager* pRaceMan, void* hparmResults)
{
GfLogWarning("Ignoring '%s' driver #%d : not found in available drivers\n",
pszModName, nItfIndex);
// We are no more consistent with the race params (in memory).
_pPrivate->bIsDirty = true;
continue;
}
@ -421,6 +428,10 @@ void GfRace::load(GfRaceManager* pRaceMan, void* hparmResults)
{
GfLogWarning("Ignoring subsequent competitors (max=%u)\n",
_pPrivate->nMaxCompetitors);
// We are no more consistent with the race params (in memory).
_pPrivate->bIsDirty = true;
break;
}
@ -466,6 +477,9 @@ void GfRace::load(GfRaceManager* pRaceMan, void* hparmResults)
{
GfLogWarning("Ignoring '%s' (%s' #%d) : Type or car category not accepted by the race\n",
pCompetitor->getName().c_str(), pszModName, nItfIndex);
// We are no more consistent with the race params (in memory).
_pPrivate->bIsDirty = true;
}
}
@ -474,9 +488,6 @@ void GfRace::load(GfRaceManager* pRaceMan, void* hparmResults)
GfParmGetStr(hparmRaceMan, RM_SECT_DRIVERS, RM_ATTR_FOCUSED, "");
_pPrivate->nFocusedItfIndex =
(int)GfParmGetNum(hparmRaceMan, RM_SECT_DRIVERS, RM_ATTR_FOCUSEDIDX, NULL, 0);
// Now we are consistent with the race params (in memory).
_pPrivate->bIsDirty = false;
}
void GfRace::store()