Skip to content

Commit

Permalink
Fixed wireframe not being removed from the camera
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxgurugamer committed Mar 2, 2019
1 parent c4d4efb commit 2be42a4
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 17 deletions.
Binary file modified .vs/KRASH/v15/sqlite3/storage.ide
Binary file not shown.
5 changes: 4 additions & 1 deletion ChangeLog.txt
Expand Up @@ -203,4 +203,7 @@
Version bump for current

0.5.29.7
Removed KRASHCustom.cfg from release directory
Removed KRASHCustom.cfg from release directory

0.5.29.8
Fixed wireframe not being removed from the camera
2 changes: 1 addition & 1 deletion GameData/KRASH/KRASH.version
Expand Up @@ -10,7 +10,7 @@
"MAJOR": 0,
"MINOR": 5,
"PATCH": 29,
"BUILD": 7
"BUILD": 8
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
2 changes: 1 addition & 1 deletion KRASH.version
Expand Up @@ -10,7 +10,7 @@
"MAJOR": 0,
"MINOR": 5,
"PATCH": 29,
"BUILD": 7
"BUILD": 8
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssemblyVersion.cs
Expand Up @@ -10,4 +10,4 @@

using System.Reflection;

[assembly: AssemblyVersion("0.5.29.7")]
[assembly: AssemblyVersion("0.5.29.8")]
10 changes: 5 additions & 5 deletions Source/KRASH.csproj
Expand Up @@ -99,22 +99,22 @@
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.5.1_dev\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>R:\KSP_1.6.1_dev\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="ClickThroughBlocker">
<HintPath>R:\KSP_1.5.1_dev\GameData\000_ClickThroughBlocker\Plugins\ClickThroughBlocker.dll</HintPath>
<HintPath>R:\KSP_1.6.1_dev\GameData\000_ClickThroughBlocker\Plugins\ClickThroughBlocker.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="ToolbarControl">
<HintPath>R:\KSP_1.5.1_dev\GameData\001_ToolbarControl\Plugins\ToolbarControl.dll</HintPath>
<HintPath>R:\KSP_1.6.1_dev\GameData\001_ToolbarControl\Plugins\ToolbarControl.dll</HintPath>
</Reference>
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.5.1_dev\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>R:\KSP_1.6.1_dev\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.5.1_dev\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
<HintPath>R:\KSP_1.6.1_dev\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup>
Expand Down
28 changes: 21 additions & 7 deletions Source/SceneModules/FlightModule.cs
Expand Up @@ -287,17 +287,31 @@ public void OnDestroy()
// if (Camera.main.gameObject.GetComponent(typeof(Wireframe)))
// Component.Destroy(Camera.main.gameObject.GetComponent(typeof(Wireframe)));
var v = FlightGlobals.ActiveVessel;

foreach (var p in v.parts)
if (wireFrameAdded)
{
// Try to remove any WireFrame components found.
try
#if false
foreach (var p in v.parts)
{
Destroy(p.partTransform.gameObject.GetComponent<WireFrame>());
// Try to remove any WireFrame components found.
try
{
Destroy(p.partTransform.gameObject.GetComponent<WireFrame>());
}
catch { }
}
catch { }
#endif
for (int i = 0; i < cams.Length; i++)
{
if (cams[i].name == "Camera 00")
{
nearCamera = cams[i];
Destroy(nearCamera.gameObject.GetComponent<WireFrame>());
break;
}

}

}

KRASHShelter.instance.simPauseMenuInstance = null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion deploy.bat
Expand Up @@ -7,7 +7,7 @@ rem GAMEDATA is the name of the local GameData
rem VERSIONFILE is the name of the version file, usually the same as GAMEDATA,
rem but not always

set H=R:\KSP_1.5.1_dev
set H=R:\KSP_1.6.1_dev
set GAMEDIR=KRASH
set GAMEDATA="GameData\"
set VERSIONFILE=%GAMEDIR%.version
Expand Down

0 comments on commit 2be42a4

Please sign in to comment.