forked from speed-dreams/speed-dreams-code
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:
parent
b193060f5c
commit
c299765379
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue