Skip to content

Commit

Permalink
Automatic merge of T1.5-rc1-41-g3023eb3df and 10 pull requests
Browse files Browse the repository at this point in the history
- Pull request #570 at 824f96f: Experimental glTF 2.0 support with PBR lighting
- Pull request #630 at 704731a: Sky Color Fix (Addresses Trello Roadmap Card #367 for More accurate sunrise and sunset)
- Pull request #650 at 0106424: Renewed Russian translation up to 1.5-rc1 version
- Pull request #652 at 918fdb1: Add button functions to Raildriver
- Pull request #667 at aa5c629: Fix typo in Czech translation of menu
- Pull request #677 at e7564c0: Correct double heading bug
- Pull request #688 at e44897d: adds Help Icons to Video tab
- Pull request #690 at 3399d4b: Sync turntables and transfertables in multiplayer mode
- Pull request #692 at c82a76d: Italian translation for OR 1.5
- Pull request #699 at 6baf43d: Bug fix for https://bugs.launchpad.net/or/+bug/1987453. Web: HUD/Force Information, some labels not visible.
  • Loading branch information
openrails-bot committed Aug 25, 2022
12 parents 5c89642 + 3023eb3 + 824f96f + 704731a + 0106424 + 918fdb1 + aa5c629 + e7564c0 + e44897d + 3399d4b + c82a76d + 6baf43d commit 732f8f2
Showing 1 changed file with 7 additions and 8 deletions.
Expand Up @@ -1821,7 +1821,7 @@ public override void Update(float elapsedClockSeconds)
}
}


var gearloco = this as MSTSDieselLocomotive;

// pass gearbox command key to other gearboxes in the same locomotive
Expand All @@ -1832,21 +1832,22 @@ public override void Update(float elapsedClockSeconds)
int ii = 0;
foreach (var eng in gearloco.DieselEngines.DEList)
{
if (gearloco.DieselEngines.Count != 0)
// don't change the first engine as this is the reference for all the others
if (ii != 0)
{
gearloco.DieselEngines[ii].GearBox.currentGearIndex = gearloco.DieselEngines[0].GearBox.CurrentGearIndex;
}

ii = ii + 1;
}

// pass gearbox command key to other locomotives in train
// pass gearbox command key to other locomotives in train, don't treat the player locomotive in this fashion.
foreach (TrainCar car in Train.Cars)
{
var dieselloco = this as MSTSDieselLocomotive;
var locog = car as MSTSDieselLocomotive;

if (locog != null && dieselloco != null && car != this)
if (locog != null && dieselloco != null && car != this && !locog.IsLeadLocomotive())
{

locog.DieselEngines[0].GearBox.currentGearIndex = dieselloco.DieselEngines[0].GearBox.CurrentGearIndex;
Expand All @@ -1857,12 +1858,10 @@ public override void Update(float elapsedClockSeconds)
locog.Simulator.Confirmer.ConfirmWithPerCent(CabControl.GearBox, CabSetting.Increase, locog.GearBoxController.CurrentNotch);
locog.AlerterReset(TCSEvent.GearBoxChanged);
locog.SignalGearBoxChangeEvents();

previousChangedGearBoxNotch = GearBoxController.CurrentNotch; // reset loop until next gear change


}
}

previousChangedGearBoxNotch = GearBoxController.CurrentNotch; // reset loop until next gear change
}

TrainControlSystem.Update(elapsedClockSeconds);
Expand Down

0 comments on commit 732f8f2

Please sign in to comment.