Quick and Dirty fix of infinite wheel spin

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3034 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a48bd547bc51ea8b46541a6f26811e5f5a2bdf56
Former-commit-id: d2321914fd680893f9ee86a80556a454d39ea402
This commit is contained in:
wdbee 2010-10-21 22:27:40 +00:00
parent b193060f5c
commit c299765379

View file

@ -280,7 +280,8 @@ SimWheelUpdateRotation(tCar *car)
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
wheel = &(car->wheel[i]); wheel = &(car->wheel[i]);
wheel->spinVel = wheel->in.spinVel; wheel->spinVel = wheel->in.spinVel;
if (wheel->spinVel > 1000000)
wheel->spinVel = 1;
FLOAT_RELAXATION2(wheel->spinVel, wheel->prespinVel, 50.0f); FLOAT_RELAXATION2(wheel->spinVel, wheel->prespinVel, 50.0f);
wheel->relPos.ay += wheel->spinVel * SimDeltaTime; wheel->relPos.ay += wheel->spinVel * SimDeltaTime;