Skip to content

Commit

Permalink
Merge pull request #352 from Angel-125/master
Browse files Browse the repository at this point in the history
Fixes MASFlightComputer to create GameObjects during the start function.
  • Loading branch information
MOARdV committed Aug 6, 2022
2 parents 17b2ee1 + 5e04c71 commit 16e4e7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/MASFlightComputer.cs
Expand Up @@ -1203,6 +1203,9 @@ public void Start()
{
if (HighLogic.LoadedSceneIsFlight)
{
audioObject = new GameObject();
morseAudioObject = new GameObject();

additionalEC = 0.0f;
rate = Mathf.Max(0.0f, rate);
commandModule = part.FindModuleImplementing<ModuleCommand>();
Expand Down Expand Up @@ -1720,9 +1723,9 @@ private void UpdateLocalCrew()
#endregion

#region Audio Player
GameObject audioObject = new GameObject();
GameObject audioObject;
AudioSource audioSource;
GameObject morseAudioObject = new GameObject();
GameObject morseAudioObject;
AudioSource morseAudioSource;
string morseSequence;
float morseVolume;
Expand Down

0 comments on commit 16e4e7b

Please sign in to comment.