@@ -121,7 +121,7 @@ gearboxMogliGlobals.hudTitleSize = 0.03
121121gearboxMogliGlobals .hudBorder = 0.005
122122gearboxMogliGlobals .hudWidth = 0.15
123123gearboxMogliGlobals .stallWarningTime = 250
124- gearboxMogliGlobals .stallMotorOffTime = 3000
124+ gearboxMogliGlobals .stallMotorOffTime = 1250
125125gearboxMogliGlobals .realFuelUsage = true
126126gearboxMogliGlobals .idleFuelTorqueRatio = 0.2
127127gearboxMogliGlobals .defaultLiterPerSqm = 1.2 -- 1.2 l/m² for wheat
@@ -133,10 +133,8 @@ gearboxMogliGlobals.dtDeltaTargetSlow = 0.0002 -- 5 seconds
133133gearboxMogliGlobals .ddsDirectory = " dds/"
134134gearboxMogliGlobals .initMotorOnLoad = true
135135gearboxMogliGlobals .ptoSpeedLimit = true
136- gearboxMogliGlobals .clutchFrom = 0.0
137- gearboxMogliGlobals .clutchTo = 0.8
138- gearboxMogliGlobals .clutchExp = 2.2
139- gearboxMogliGlobals .clutchFactor = 2.4
136+ gearboxMogliGlobals .clutchExp = 2.0
137+ gearboxMogliGlobals .clutchFactor = 1.2
140138gearboxMogliGlobals .grindingMinRpmDelta = 200
141139gearboxMogliGlobals .grindingMaxRpmSound = 600
142140gearboxMogliGlobals .grindingMaxRpmDelta = gearboxMogli .huge
@@ -5943,14 +5941,10 @@ function gearboxMogli:newUpdateWheelsPhysics( superFunc, dt, currentSpeed, acc,
59435941
59445942
59455943 if ( self :mrGbMGetAutoHold () or ( self :mrGbMGetAutoClutch () and acceleration > 0.001 ) )
5946- and ( ( self .movingDirection * currentSpeed > 5.5555555556e-4 and self .mrGbMS .ReverseActive )
5947- or ( self .movingDirection * currentSpeed < - 5.5555555556e-4 and not ( self .mrGbMS .ReverseActive ) ) ) then
5948- -- wrong direction
5949- -- if g_currentMission.time >= self.mrGbML.DirectionChangeTime + 2000 then
5950- brakePedal = 1
5951- -- else
5952- -- brakePedal = math.max( g_currentMission.time - self.mrGbML.DirectionChangeTime ) * 0.0005
5953- -- end
5944+ and ( ( self .movingDirection * currentSpeed > 2.7777777778e-4 and self .mrGbMS .ReverseActive )
5945+ or ( self .movingDirection * currentSpeed < - 2.7777777778e-4 and not ( self .mrGbMS .ReverseActive ) ) ) then
5946+ -- wrong direction
5947+ brakePedal = 1
59545948 brakeLights = true
59555949 end
59565950
@@ -5962,7 +5956,6 @@ function gearboxMogli:newUpdateWheelsPhysics( superFunc, dt, currentSpeed, acc,
59625956 and acceleration < 0.1 then
59635957 -- auto hold
59645958 brakePedal = 1
5965- -- brakeLights = true
59665959 end
59675960
59685961 self .setBrakeLightsVisibility (self , brakeLights )
@@ -5987,11 +5980,16 @@ function gearboxMogli:newUpdateWheelsPhysics( superFunc, dt, currentSpeed, acc,
59875980 local c = 0
59885981
59895982 brakePedal = math.max ( brakePedal , brakeForce )
5990-
5983+
59915984 if self .motor .clutchPercent < gearboxMogli .minClutchPercent + gearboxMogli .minClutchPercent then
59925985 c = 0
59935986 else
5994- c = gearboxMogli .huge
5987+ local cp = self .motor .clutchPercent
5988+ if self .mrGbMS .TorqueConverter then
5989+ cp = self .mrGbMS .ManualClutch
5990+ end
5991+
5992+ c = self .mrGbMG .clutchFactor * self .motor .maxMotorTorque * ( ( 0.5 * ( 1 - math.cos ( math.pi * cp )) ) ^ self .mrGbMG .clutchExp )
59955993 end
59965994
59975995 setVehicleProps (self .motorizedNode , torque , maxRotSpeed , ratio , c , self .motor :getRotInertia (), self .motor :getDampingRate ());
@@ -7169,8 +7167,8 @@ function gearboxMogliMotor:getTorque( acceleration, limitRpm )
71697167 self .ratioFactorR = 1 / ( self .ratioFactorG * self .hydrostaticFactor )
71707168 end
71717169
7172- elseif self .clutchPercent < 1 and self .vehicle .mrGbMS .TorqueConverter then
7173- local c = self .clutchRpm / self :getMotorRpm ()
7170+ elseif self .autoClutchPercent < 1 and self .vehicle .mrGbMS .TorqueConverter then
7171+ local c = self .clutchRpm / self :getMotorRpm ( self . autoClutchPercent )
71747172 if c * self .vehicle .mrGbMS .TorqueConverterFactor > 1 then
71757173 self .ratioFactorG = 1 / c
71767174 else
@@ -7741,12 +7739,12 @@ function gearboxMogliMotor:mrGbMUpdateGear( accelerationPedal )
77417739 and self .vehicle .mrGbMS .HydrostaticMin < gearboxMogli .eps
77427740 and accelerationPedal >= - 0.001 then
77437741 brakeNeutral = false
7744- elseif currentAbsSpeed < - 1.8
7745- and math.abs ( self .vehicle .lastSpeedReal * 3600 ) > 1
7746- and autoOpenClutch
7747- and not self .vehicle .mrGbMS .TorqueConverterOrHydro then
7748- brakeNeutral = true
7749- self .noTorque = true
7742+ -- elseif currentAbsSpeed < -1.8
7743+ -- and math.abs( self.vehicle.lastSpeedReal * 3600 ) > 1
7744+ -- and autoOpenClutch
7745+ -- and not self.vehicle.mrGbMS.TorqueConverterOrHydro then
7746+ -- brakeNeutral = true
7747+ -- self.noTorque = true
77507748 elseif self .vehicle .cruiseControl .state ~= 0
77517749 or not autoOpenClutch then
77527750 -- no automatic stop or cruise control is on
@@ -9245,11 +9243,15 @@ end
92459243-- **********************************************************************************************************
92469244-- gearboxMogliMotor:getMotorRpm
92479245-- **********************************************************************************************************
9248- function gearboxMogliMotor :getMotorRpm ( )
9246+ function gearboxMogliMotor :getMotorRpm ( cIn )
92499247 if self .noTransmission then
92509248 return self :getThrottleRpm ()
92519249 end
9252- return self .clutchPercent * self .clutchRpm + ( 1 - self .clutchPercent ) * self :getThrottleRpm ()
9250+ local c = self .clutchPercent
9251+ if type ( cIn ) == " number" then
9252+ c = cIn
9253+ end
9254+ return c * self .clutchRpm + ( 1 - c ) * self :getThrottleRpm ()
92539255end
92549256
92559257-- **********************************************************************************************************
0 commit comments