- added more degradation if wheel skid (for test)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7200 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: aff83854cd0a6f4b17a01263ebc6311d0775b3c1 Former-commit-id: c31b8fc4ca1eed1b9ba4e8d17f75ef372d240631
This commit is contained in:
parent
6d7b051494
commit
af2aaf735b
1 changed files with 15 additions and 8 deletions
|
@ -101,14 +101,14 @@ void SimWheelConfig(tCar *car, int index)
|
|||
wheel->Tinit = GfParmGetNum(hdle, WheelSect[index], PRM_INITTEMP, (char*)NULL, Tair);
|
||||
wheel->treadDepth = 1.0;
|
||||
wheel->Topt = GfParmGetNum(hdle, WheelSect[index], PRM_OPTTEMP, (char*)NULL, 350.0f);
|
||||
if (car->features & FEAT_TIRETEMPDEG)
|
||||
if (car->features & FEAT_TIRETEMPDEG)
|
||||
{
|
||||
wheel->Ttire = wheel->Tinit;
|
||||
}
|
||||
else
|
||||
{
|
||||
wheel->Ttire = wheel->Topt;
|
||||
}
|
||||
wheel->Ttire = wheel->Tinit;
|
||||
}
|
||||
else
|
||||
{
|
||||
wheel->Ttire = wheel->Topt;
|
||||
}
|
||||
tdble coldmufactor = GfParmGetNum(hdle, WheelSect[index], PRM_COLDMUFACTOR, (char*)NULL, 1.0f);
|
||||
coldmufactor = MIN(MAX(coldmufactor, 0.0f), 1.0f);
|
||||
wheel->muTmult = (1 - coldmufactor) / ((wheel->Topt - 273) * (wheel->Topt - 273));
|
||||
|
@ -553,7 +553,14 @@ void SimWheelUpdateForce(tCar *car, int index)
|
|||
//air cooling
|
||||
wheel->Ttire -= wheel->aircoolm * (1 + wheel->speedcoolm * v) * (wheel->Ttire - Tair) * SimDeltaTime;
|
||||
//tire wear
|
||||
if(wheel->treadDepth > 0.0) {wheel->treadDepth -= wheel->wearrate * Work;}
|
||||
if(wheel->treadDepth > 0.0)
|
||||
{
|
||||
wheel->treadDepth -= wheel->wearrate * Work;
|
||||
|
||||
/* For test more degradation if wheel skid */
|
||||
if (car->carElt->_skid[index] > 0.1f)
|
||||
wheel->treadDepth -= 0.003f * SimDeltaTime;
|
||||
}
|
||||
else {wheel->treadDepth = 0.0;} //note: lets it go to slightly negative for one cycle
|
||||
//filling carElt
|
||||
car->carElt->_tyreT_in(index) = wheel->Ttire;
|
||||
|
|
Loading…
Reference in a new issue