Skip to content

Commit

Permalink
Interstage adapter was trying to remove the fairing around any engine…
Browse files Browse the repository at this point in the history
… connected above it, which was breaking in KSP 1.4
  • Loading branch information
Ryan Caskey committed May 30, 2018
1 parent 9c9b69c commit 8d00145
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 44 deletions.
Binary file modified GameData/ProceduralFairings/Plugins/ProceduralFairings.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion GameData/ProceduralFairings/ProceduralFairings.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"MAJOR" : 1,
"MINOR" : 4,
"PATCH" : 3,
"BUILD" : 3
"BUILD" : 4
},
"KSP_VERSION_MIN" : {
"MAJOR" : 1,
Expand Down
45 changes: 3 additions & 42 deletions Source/ProceduralFairings/ProcAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -546,49 +546,10 @@ public override void FixedUpdate ()
{
isShipModified = false;

// Remove the engine fairing (if there is any) from topmost node.
// We used to remove the engine fairing (if there is any) from topmost node, but lately that's been causing NREs.
// Since KSP gives us this option nativley, let's just use KSP to do that if we want.

if (!engineFairingRemoved)
{
var node = part.FindAttachNode (topNodeName);

if (node != null && node.attachedPart != null)
{
var tp = node.attachedPart;

if (HighLogic.LoadedSceneIsEditor || !tp.packed)
{
var comps = tp.GetComponents<ModuleJettison>();

for (int i = 0; i < comps.Length; i++)
{
var mj = comps [i];

var jt = tp.FindModelTransform (mj.jettisonName);

if (jt == null)
{
jt = mj.jettisonTransform;
}

if (jt != null)
{
jt.gameObject.SetActive (false);
}

mj.jettisonName = null;
mj.jettisonTransform = null;
}

if (!HighLogic.LoadedSceneIsEditor)
{
engineFairingRemoved = true;
}
}
}
}

if (!HighLogic.LoadedSceneIsEditor)
if (!HighLogic.LoadedSceneIsEditor)
{
if (isTopNodePartPresent)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/ProceduralFairings/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// • Revision

[assembly: AssemblyVersion ("1.4.3.2152")]
[assembly: AssemblyFileVersion ("1.4.3.3")]
[assembly: AssemblyFileVersion ("1.4.3.4")]

// The KSPAssembly attribute can be used to ensure that the plugin assemblies
// are loaded in the correct order.
Expand Down

0 comments on commit 8d00145

Please sign in to comment.