Skip to content

Commit

Permalink
Revert "1.4.3 updates"
Browse files Browse the repository at this point in the history
This reverts commit 1e0585f.
  • Loading branch information
Ryan Caskey committed May 11, 2018
1 parent 1e0585f commit cc09af5
Show file tree
Hide file tree
Showing 28 changed files with 18 additions and 86 deletions.
Binary file not shown.
58 changes: 0 additions & 58 deletions GameData/ProceduralFairings/README.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 6 additions & 8 deletions Source/FairingBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,9 @@ LineRenderer makeLineRenderer(string name, Color color, float wd)
var r = o.AddComponent<LineRenderer>();
r.useWorldSpace = false;
r.material = new Material(Shader.Find("Particles/Additive"));
r.startColor = color;
r.endColor = color;
r.startWidth = wd;
r.endWidth = wd;
r.positionCount = 0;
r.SetColors(color, color);
r.SetWidth(wd, wd);
r.SetVertexCount(0);
return r;
}

Expand Down Expand Up @@ -623,7 +621,7 @@ void recalcShape()

// fill profile outline (for debugging)
if (line) {
line.positionCount = scan.profile.Count * 2 + 2;
line.SetVertexCount(scan.profile.Count * 2 + 2);

float prevRad = 0;
int hi = 0;
Expand Down Expand Up @@ -793,7 +791,7 @@ void recalcShape()
// no side parts - fill fairing outlines
for (int j = 0; j < outline.Count; j++) {
var lr = outline[j];
lr.positionCount =shape.Length;
lr.SetVertexCount(shape.Length);
for (int i = 0; i < shape.Length; ++i)
lr.SetPosition(i, new Vector3(shape[i].x, shape[i].y));

Expand All @@ -803,7 +801,7 @@ void recalcShape()
else {
for (int j = 0; j < outline.Count; j++) {
var lr = outline[j];
lr.positionCount = 0;
lr.SetVertexCount(0);
}
}

Expand Down
10 changes: 2 additions & 8 deletions Source/FairingSide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -497,14 +497,8 @@ public void rebuildMesh()
}

m.triangles = tri;

// The right way to call optimize on a mesh is to use the MeshUtility
// found in UnityEditor, but we don't seem to have a reference to that anywhere...
/*
if (!HighLogic.LoadedSceneIsEditor) {
MeshUtility.Optimize(m);
}
*/

if (!HighLogic.LoadedSceneIsEditor) m.Optimize();

StartCoroutine(PFUtils.updateDragCubeCoroutine(part, 1));
}
Expand Down
10 changes: 4 additions & 6 deletions Source/PFKMJoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public virtual void FixedUpdate()
private LineRenderer JointLine(Vector3 posp, Vector3 pospp, Color col, float width)
{
LineRenderer lineRenderer = this.makeLineRenderer("JointLine", col, width);
lineRenderer.positionCount = 2;
lineRenderer.SetVertexCount(2);
lineRenderer.SetPosition(0, posp);
lineRenderer.SetPosition(1, pospp);
lineRenderer.useWorldSpace = true;
Expand Down Expand Up @@ -279,11 +279,9 @@ private LineRenderer makeLineRenderer(string name, Color color, float wd)
LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>();
lineRenderer.useWorldSpace = true;
lineRenderer.material = new Material(Shader.Find("Particles/Additive"));
lineRenderer.startColor = color;
lineRenderer.endColor = color;
lineRenderer.startWidth = wd;
lineRenderer.endWidth = wd;
lineRenderer.positionCount = 0;
lineRenderer.SetColors(color, color);
lineRenderer.SetWidth(wd, wd);
lineRenderer.SetVertexCount(0);
return lineRenderer;
}

Expand Down
4 changes: 2 additions & 2 deletions Source/ProceduralFairings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\1.4.3\Assembly-CSharp.dll</HintPath>
<HintPath>C:\Users\caske\Downloads\ksp-win64-1.3\KSP_win64\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -42,7 +42,7 @@
<Reference Include="System.Xml" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\1.4.3\UnityEngine.dll</HintPath>
<HintPath>C:\Users\caske\Downloads\ksp-win64-1.3\KSP_win64\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("ProceduralFairings")]
[assembly: AssemblyDescription("Procedural Fairings 4.0 for KSP 1.3.1")]
[assembly: AssemblyDescription("Procedural Fairings 4.0 for KSP 1.3")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ProceduralFairings.Properties")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -29,5 +29,5 @@
// Buildnummer
// Revision
//
[assembly: AssemblyVersion("0.0.5.0")]
[assembly: AssemblyFileVersion("0.0.5.0")]
[assembly: AssemblyVersion("0.0.4.0")]
[assembly: AssemblyFileVersion("0.0.4.0")]

0 comments on commit cc09af5

Please sign in to comment.