forked from speed-dreams/speed-dreams-code
SimWheelUpdateForce: use correct force for wheel movement
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5642 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 9c1ce72394a2fa65fb0ec0f337e9834aebeecf15 Former-commit-id: bf0407039f7e335a4d1e4e6268bd73112b9d3c12
This commit is contained in:
parent
aebb440e5b
commit
ecf0363f6e
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ void SimWheelUpdateForce(tCar *car, int index)
|
|||
if ((wheel->state & SIM_SUSP_EXT) == 0) {
|
||||
wheel->forces.z = axleFz + wheel->susp.force;
|
||||
reaction_force = wheel->forces.z;
|
||||
wheel->rel_vel -= SimDeltaTime * wheel->susp.force / wheel->mass;
|
||||
wheel->rel_vel -= SimDeltaTime * wheel->forces.z / wheel->mass;
|
||||
if (wheel->forces.z < 0.0f) {
|
||||
wheel->forces.z = 0.0f;
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ void SimWheelUpdateForce(tCar *car, int index)
|
|||
if (wheel->rel_vel < 0.0) {
|
||||
wheel->rel_vel = 0.0;
|
||||
}
|
||||
wheel->rel_vel -= SimDeltaTime * wheel->susp.force / wheel->mass;
|
||||
wheel->rel_vel -= SimDeltaTime * wheel->forces.z / wheel->mass;
|
||||
wheel->forces.z = 0.0f;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue