diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs index 29b09925371515726c7d69d99d763eaffe7c6a5f..ca9f35bce0d2b36f83204c5940b73bd14e25a5ae 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategyV2.cs @@ -548,6 +548,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public override uint Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) { + //_nextGear = gear; + while (_nextGear > 1 && SpeedTooLowForEngine(_nextGear, outAngularVelocity)) { + _nextGear--; + } + while (_nextGear < ModelData.Gears.Count && + SpeedTooHighForEngine(_nextGear, outAngularVelocity)) { + _nextGear++; + } + return _nextGear; }