- fix tire temperature after pit stop for car with these feature and not
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7902 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 79f4663cd9598fc6a62346d253eb150fec8af074 Former-commit-id: ad39fae674e4981b50186b787bb9ece201db94d1
This commit is contained in:
parent
d32ac8cc1e
commit
41e6019486
4 changed files with 779 additions and 681 deletions
File diff suppressed because it is too large
Load diff
|
@ -94,9 +94,9 @@ ReCarsUpdateCarPitTime(tCarElt *car)
|
|||
for (i=0; i<4; i++)
|
||||
{
|
||||
car->_tyreCondition(i) = 1.01f;
|
||||
car->_tyreT_in(i) = 50.0f;
|
||||
car->_tyreT_mid(i) = 50.0f;
|
||||
car->_tyreT_out(i) = 50.0f;
|
||||
car->_tyreT_in(i) = car->priv.air_temp;
|
||||
car->_tyreT_mid(i) = car->priv.air_temp;
|
||||
car->_tyreT_out(i) = car->priv.air_temp;
|
||||
}
|
||||
|
||||
GfLogInfo("%s in repair pit stop for %.1f s (refueling by %.1f l, repairing by %d).\n",
|
||||
|
|
|
@ -268,13 +268,20 @@ SimReConfig(tCarElt *carElt)
|
|||
}
|
||||
|
||||
carElt->setup.reqRepair.desired_value = 0.0;
|
||||
carElt->priv.air_temp = Tair;
|
||||
|
||||
if (carElt->setup.reqTireset.desired_value > 0.9)
|
||||
{
|
||||
for(i=0; i<4; i++)
|
||||
{
|
||||
car->wheel[i].treadDepth = 1.0;
|
||||
car->wheel[i].Ttire = car->wheel[i].Tinit;
|
||||
car->wheel[i].treadDepth = 1.01f;
|
||||
|
||||
if (car->features & FEAT_TIRETEMPDEG)
|
||||
car->wheel[i].Ttire = car->wheel[i].Tinit;
|
||||
else
|
||||
car->wheel[i].Ttire = car->wheel[i].Topt;
|
||||
|
||||
carElt->priv.air_temp = car->wheel[i].Ttire;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,35 +27,35 @@ Simuv4* Simuv4::_pSelf = 0;
|
|||
|
||||
int openGfModule(const char* pszShLibName, void* hShLibHandle)
|
||||
{
|
||||
// Instanciate the (only) module instance.
|
||||
Simuv4::_pSelf = new Simuv4(pszShLibName, hShLibHandle);
|
||||
// Instanciate the (only) module instance.
|
||||
Simuv4::_pSelf = new Simuv4(pszShLibName, hShLibHandle);
|
||||
|
||||
// Register it to the GfModule module manager if OK.
|
||||
if (Simuv4::_pSelf)
|
||||
GfModule::register_(Simuv4::_pSelf);
|
||||
// Register it to the GfModule module manager if OK.
|
||||
if (Simuv4::_pSelf)
|
||||
GfModule::register_(Simuv4::_pSelf);
|
||||
|
||||
// Report about success or error.
|
||||
return Simuv4::_pSelf ? 0 : 1;
|
||||
// Report about success or error.
|
||||
return Simuv4::_pSelf ? 0 : 1;
|
||||
}
|
||||
|
||||
int closeGfModule()
|
||||
{
|
||||
// Unregister it from the GfModule module manager.
|
||||
if (Simuv4::_pSelf)
|
||||
Simuv4::unregister(Simuv4::_pSelf);
|
||||
|
||||
// Delete the (only) module instance.
|
||||
delete Simuv4::_pSelf;
|
||||
Simuv4::_pSelf = 0;
|
||||
// Unregister it from the GfModule module manager.
|
||||
if (Simuv4::_pSelf)
|
||||
Simuv4::unregister(Simuv4::_pSelf);
|
||||
|
||||
// Report about success or error.
|
||||
return 0;
|
||||
// Delete the (only) module instance.
|
||||
delete Simuv4::_pSelf;
|
||||
Simuv4::_pSelf = 0;
|
||||
|
||||
// Report about success or error.
|
||||
return 0;
|
||||
}
|
||||
|
||||
Simuv4& Simuv4::self()
|
||||
{
|
||||
// Pre-condition : 1 successfull openGfModule call.
|
||||
return *_pSelf;
|
||||
// Pre-condition : 1 successfull openGfModule call.
|
||||
return *_pSelf;
|
||||
}
|
||||
|
||||
Simuv4::Simuv4(const std::string& strShLibName, void* hShLibHandle)
|
||||
|
@ -70,45 +70,45 @@ Simuv4::~Simuv4()
|
|||
// Implementation of IPhysicsEngine.
|
||||
void Simuv4::initialize(int nCars, struct Track* pTrack)
|
||||
{
|
||||
::SimInit(nCars, pTrack);
|
||||
::SimInit(nCars, pTrack);
|
||||
}
|
||||
|
||||
void Simuv4::configureCar(struct CarElt* pCar)
|
||||
{
|
||||
::SimConfig(pCar);
|
||||
::SimConfig(pCar);
|
||||
}
|
||||
|
||||
void Simuv4::reconfigureCar(struct CarElt* pCar)
|
||||
{
|
||||
::SimReConfig(pCar);
|
||||
::SimReConfig(pCar);
|
||||
}
|
||||
|
||||
void Simuv4::toggleCarTelemetry(int nCarIndex, bool bOn)
|
||||
{
|
||||
::SimCarTelemetry(nCarIndex, bOn);
|
||||
::SimCarTelemetry(nCarIndex, bOn);
|
||||
}
|
||||
|
||||
void Simuv4::updateSituation(struct Situation *pSituation, double fDeltaTime)
|
||||
{
|
||||
::SimUpdate(pSituation, fDeltaTime);
|
||||
::SimUpdate(pSituation, fDeltaTime);
|
||||
}
|
||||
|
||||
void Simuv4::updateCar(struct Situation *pSituation, double fDeltaTime, int nCarIndex)
|
||||
{
|
||||
::SimUpdateSingleCar(nCarIndex, fDeltaTime, pSituation);
|
||||
::SimUpdateSingleCar(nCarIndex, fDeltaTime, pSituation);
|
||||
}
|
||||
|
||||
void Simuv4::setCar(const struct DynPt& dynGCG, int nCarIndex)
|
||||
{
|
||||
::UpdateSimCarTable(dynGCG, nCarIndex);
|
||||
::UpdateSimCarTable(dynGCG, nCarIndex);
|
||||
}
|
||||
|
||||
tDynPt* Simuv4::getCar(int nCarIndex)
|
||||
{
|
||||
return ::GetSimCarTable(nCarIndex);
|
||||
return ::GetSimCarTable(nCarIndex);
|
||||
}
|
||||
|
||||
void Simuv4::shutdown()
|
||||
{
|
||||
::SimShutdown();
|
||||
::SimShutdown();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue