Forums

Full Version: Bug in cardynamics.cpp LoadWheel code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
    if (!cfg.get("mass", mass) && !cfg.get("inertia", inertia))
    {
...
        mass = tire_mass + rim_mass;
        inertia = (tire_inertia + rim_inertia) * 4;    // scale inertia fixme
    }
    wheel.SetMass(mass);
    wheel.SetInertia(inertia);        // inertia of associated driveshaft

If the "mass" parameter is present in .car file then second part of the if() statement will not be evaluated and inertia = 0 even if present in .car file.
Fixed, thanks.