Skip to content

Commit

Permalink
change instance to __instance - im dumb
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Jan 28, 2024
1 parent d1f40ef commit 096f24c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions QSB/ShipSync/Patches/ShipAudioPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,23 @@ public static bool ShipThrusterAudio_Update(ShipThrusterAudio __instance)

[HarmonyPrefix]
[HarmonyPatch(typeof(TravelMusicController), nameof(TravelMusicController.Update))]
public static bool TravelMusicController_Update(TravelMusicController instance)
public static bool TravelMusicController_Update(TravelMusicController __instance)
{
// only this line is changed
instance._isTraveling = PlayerState.IsInsideShip()
&& ShipManager.Instance.CurrentFlyer != uint.MaxValue
&& Locator.GetPlayerRulesetDetector().AllowTravelMusic();
__instance._isTraveling = PlayerState.IsInsideShip()
&& ShipManager.Instance.CurrentFlyer != uint.MaxValue
&& Locator.GetPlayerRulesetDetector().AllowTravelMusic();

if (instance._isTraveling && !instance._wasTraveling)
if (__instance._isTraveling && !__instance._wasTraveling)
{
instance._audioSource.FadeIn(5f, false, false, 1f);
__instance._audioSource.FadeIn(5f, false, false, 1f);
}
else if (!instance._isTraveling && instance._wasTraveling)
else if (!__instance._isTraveling && __instance._wasTraveling)
{
instance._audioSource.FadeOut(5f, OWAudioSource.FadeOutCompleteAction.PAUSE, 0f);
__instance._audioSource.FadeOut(5f, OWAudioSource.FadeOutCompleteAction.PAUSE, 0f);
}

instance._wasTraveling = instance._isTraveling;
__instance._wasTraveling = __instance._isTraveling;

return false;
}
Expand Down

0 comments on commit 096f24c

Please sign in to comment.