Revision: 2662
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2662&view=rev
Author:   ulteq
Date:     2012-05-25 07:20:59 +0000 (Fri, 25 May 2012)
Log Message:
-----------
-Feature: avoids to shift too early to second gear when taking off of stance in 
automatic mode (e.g. rev up in N and then shift to D)

Modified Paths:
--------------
    trunk/source/main/gameplay/BeamEngine.cpp

Modified: trunk/source/main/gameplay/BeamEngine.cpp
===================================================================
--- trunk/source/main/gameplay/BeamEngine.cpp   2012-05-25 06:26:47 UTC (rev 
2661)
+++ trunk/source/main/gameplay/BeamEngine.cpp   2012-05-25 07:20:59 UTC (rev 
2662)
@@ -319,7 +319,7 @@
        // gear hack
        if (automode == AUTOMATIC && curGear >= 0 && !shifting && !postshifting 
&& (autoselect == DRIVE || autoselect == TWO))
        {
-               if ((curEngineRPM > maxRPM - 100.0f || curWheelRevolutions * 
gearsRatio[curGear + 1] > maxRPM - 100.0f))
+               if ((curEngineRPM > maxRPM - 100.0f && curGear > 1) || 
curWheelRevolutions * gearsRatio[curGear + 1] > maxRPM - 100.0f)
                {
                        if ((autoselect == DRIVE && curGear < numGears) || 
(autoselect == TWO && curGear < 2))
                        {
@@ -550,7 +550,6 @@
        }
        curClutch = 0.0f;
        curEngineRPM = 750.0f;
-       curWheelRevolutions = 0.0f;
        curClutchTorque = 0.0f;
        curTurboRPM = 0.0f;
        apressure = 0.0f;
@@ -709,7 +708,7 @@
                // search for an appropriate gear
                int newGear = 1;
 
-               while (newGear < numGears && curWheelRevolutions > 0.0f && 
curWheelRevolutions * gearsRatio[newGear + 1] < maxRPM - 100.0f)
+               while (newGear < numGears && curWheelRevolutions > 0.0f && 
curWheelRevolutions * gearsRatio[newGear + 1] > maxRPM - 100.0f)
                {
                        newGear++;
                }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to