Skip to content

Commit

Permalink
Fix #1 #646 on the stage-lock indicator stuck on and fix the other bu…
Browse files Browse the repository at this point in the history
…g of RT locks not removed upon scene exit
  • Loading branch information
KSP-TaxiService committed Feb 18, 2017
1 parent 3556af9 commit 39f421c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/RemoteTech/RTCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ public void OnDestroy()
if (Satellites != null) Satellites.Dispose();
if (Antennas != null) Antennas.Dispose();

// Release all RT locks currently engaged
ReleaseLocks();

// Remove GUI stuff
GameEvents.onShowUI.Remove(UiOn);
GameEvents.onHideUI.Remove(UiOff);
Expand All @@ -261,7 +264,7 @@ public void OnDestroy()
/// </summary>
private static void ReleaseLocks()
{
InputLockManager.RemoveControlLock("RTLockStaging");
//InputLockManager.RemoveControlLock("RTLockStaging");
InputLockManager.RemoveControlLock("RTLockSAS");
InputLockManager.RemoveControlLock("RTLockRCS");
InputLockManager.RemoveControlLock("RTLockActions");
Expand All @@ -272,7 +275,7 @@ private static void ReleaseLocks()
/// </summary>
private static void GetLocks()
{
InputLockManager.SetControlLock(ControlTypes.STAGING, "RTLockStaging");
//InputLockManager.SetControlLock(ControlTypes.STAGING, "RTLockStaging");
InputLockManager.SetControlLock(ControlTypes.SAS, "RTLockSAS");
InputLockManager.SetControlLock(ControlTypes.RCS, "RTLockRCS");
InputLockManager.SetControlLock(ControlTypes.GROUPS_ALL, "RTLockActions");
Expand Down

0 comments on commit 39f421c

Please sign in to comment.