git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2574 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 907e6be668bf27f355a443f8c860f273f0ce2b04 Former-commit-id: 9a30bdedc303529e940fb849bcceeae6b5780238
This commit is contained in:
parent
3c9991b077
commit
bd4dcef1ee
2 changed files with 12 additions and 12 deletions
|
@ -133,12 +133,12 @@ float SimpleStrategy::pitRefuel(tCarElt* car, tSituation *s)
|
||||||
{
|
{
|
||||||
if (car->_laps > 2)
|
if (car->_laps > 2)
|
||||||
laps += ( s->_totTime - s->currentTime ) / car->_bestLapTime;
|
laps += ( s->_totTime - s->currentTime ) / car->_bestLapTime;
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
// It has a pit stop in the first two laps. Normally we don't want to refuel.
|
||||||
// It has a pit stop in the first two laps. Normally we don't want to refuel.
|
// This will cause for at least sufficient fuel.
|
||||||
// This will cause for at least sufficient fuel.
|
laps += 1;
|
||||||
laps += 5;
|
}
|
||||||
}
|
}
|
||||||
fuel = MAX(MIN((car->_remainingLaps + 1.0f)*cmpfuel - car->_fuel,
|
fuel = MAX(MIN((car->_remainingLaps + 1.0f)*cmpfuel - car->_fuel,
|
||||||
car->_tank - car->_fuel),
|
car->_tank - car->_fuel),
|
||||||
|
|
|
@ -266,12 +266,12 @@ float SimpleStrategy::pitRefuel(tCarElt* car, tSituation *s)
|
||||||
{
|
{
|
||||||
if (car->_laps > 2)
|
if (car->_laps > 2)
|
||||||
laps += ( s->_totTime - s->currentTime ) / car->_bestLapTime;
|
laps += ( s->_totTime - s->currentTime ) / car->_bestLapTime;
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
// It has a pit stop in the first two laps. Normally we don't want to refuel.
|
||||||
// It has a pit stop in the first two laps. Normally we don't want to refuel.
|
// This will cause for at least sufficient fuel.
|
||||||
// This will cause for at least sufficient fuel.
|
laps += 1;
|
||||||
laps += 5;
|
}
|
||||||
}
|
}
|
||||||
fuel = MAX(MIN((car->_remainingLaps+1.5)*cmpfuel - car->_fuel, car->_tank - car->_fuel), 0.0);
|
fuel = MAX(MIN((car->_remainingLaps+1.5)*cmpfuel - car->_fuel, car->_tank - car->_fuel), 0.0);
|
||||||
imaxfuel = GfParmGetNum(car->_carHandle, HYMIE_SECT_PRIV, "MaxFuel", (char*) NULL, fuel);
|
imaxfuel = GfParmGetNum(car->_carHandle, HYMIE_SECT_PRIV, "MaxFuel", (char*) NULL, fuel);
|
||||||
|
|
Loading…
Reference in a new issue