Re #924: complete dashboard initialization in SimCarConfig
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6234 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 15f2d71377ad3e00df3118e898fefdba890badc5 Former-commit-id: 34b463477d37b941f79bea484e441656468dd13e
This commit is contained in:
parent
1d3cc95076
commit
c9e5299888
1 changed files with 23 additions and 0 deletions
|
@ -313,6 +313,25 @@ SimCarConfig(tCar *car)
|
|||
priv->dashboardInstantNb = i;
|
||||
|
||||
/* initialize dashboardRequest */
|
||||
setup->reqRepair.min = setup->reqRepair.value = setup->reqRepair.max = 0.0;
|
||||
setup->reqRepair.desired_value = 0.0;
|
||||
setup->reqRepair.stepsize = 500;
|
||||
setup->reqRepair.changed = FALSE;
|
||||
|
||||
setup->reqTireset.min = 0.0;
|
||||
setup->reqTireset.max = 1.0;
|
||||
setup->reqTireset.value = 1.0;
|
||||
setup->reqTireset.desired_value = 1.0; //1.0 means change tires, 0.0 keep old tires
|
||||
setup->reqTireset.stepsize = 1.0;
|
||||
setup->reqTireset.changed = FALSE;
|
||||
|
||||
setup->reqPenalty.min = 0.0;
|
||||
setup->reqPenalty.max = 1.0;
|
||||
setup->reqPenalty.value = 0.0;
|
||||
setup->reqPenalty.desired_value = 0.0; //0.0 means refuel/repair first, 1.0 means serve penalty first
|
||||
setup->reqPenalty.stepsize = 1.0;
|
||||
setup->reqPenalty.changed = FALSE;
|
||||
|
||||
priv->dashboardRequest[0].type = DI_FUEL;
|
||||
priv->dashboardRequest[0].setup = &(setup->fuel);
|
||||
priv->dashboardRequest[1].type = DI_REPAIR;
|
||||
|
@ -337,7 +356,11 @@ SimCarConfig(tCar *car)
|
|||
priv->dashboardRequest[i].setup = &(setup->wingAngle[1]);
|
||||
i++;
|
||||
}
|
||||
priv->dashboardRequest[i].type = DI_PENALTY;
|
||||
priv->dashboardRequest[i].setup = &(setup->reqPenalty);
|
||||
i++;
|
||||
priv->dashboardRequestNb = i;
|
||||
priv->dashboardActiveItem = 0;
|
||||
|
||||
/*
|
||||
for(i=0;i<4;i++) {
|
||||
|
|
Loading…
Reference in a new issue