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:
torcs-ng 2010-08-01 19:21:18 +00:00
parent 3c9991b077
commit bd4dcef1ee
2 changed files with 12 additions and 12 deletions

View file

@ -133,12 +133,12 @@ float SimpleStrategy::pitRefuel(tCarElt* car, tSituation *s)
{
if (car->_laps > 2)
laps += ( s->_totTime - s->currentTime ) / car->_bestLapTime;
}
else
{
// 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.
laps += 5;
else
{
// 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.
laps += 1;
}
}
fuel = MAX(MIN((car->_remainingLaps + 1.0f)*cmpfuel - car->_fuel,
car->_tank - car->_fuel),

View file

@ -266,12 +266,12 @@ float SimpleStrategy::pitRefuel(tCarElt* car, tSituation *s)
{
if (car->_laps > 2)
laps += ( s->_totTime - s->currentTime ) / car->_bestLapTime;
}
else
{
// 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.
laps += 5;
else
{
// 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.
laps += 1;
}
}
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);