Forums
autoshift mod - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: autoshift mod (/showthread.php?tid=1217)



autoshift mod - NaN - 01-21-2010

Hey Joe,
I think I've solved the problem with blocking wheels during downshift into (first) gear.
I modified ShiftAutoClutchThrottle to apply throttle/declutch on downshift to match driveshaft rpm. Like if it's an unsynchronised gearbox.
Code:
float CAR::ShiftAutoClutchThrottle(float throttle, float dt)
{
    if(remaining_shift_time > 0.0)
    {
        const float erpm = dynamics.GetEngine().GetRPM();
        const float crpm = dynamics.CalculateDriveshaftRPM();
        if(erpm < crpm)
        {
            remaining_shift_time += dt;
           return 1.0;
        }
        else
        {
            return 0.0;
        }
    }
    return throttle;
}
Have tested it with the GT40 on Laguna Seca, had no downshift induced problems. Managed to drive a 1:52 using the keyboard. :lol:
I have to clean up the code a bit before committing.


- joevenzon - 01-21-2010

Sounds good. The throttle blip code that was there before was trying to do that, but obviously it wasn't doing a very good job. :-)