Skip to content

Commit

Permalink
update to v3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ferram4 committed Jun 30, 2016
1 parent 0028e5f commit 360ac60
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"VERSION" : {
"MAJOR" : 3,
"MINOR" : 1,
"PATCH" : 7
"MINOR" : 2,
"PATCH" : 0
},
"KSP_VERSION_MIN" : {
"MAJOR" : 1,
Expand All @@ -19,7 +19,7 @@
"KSP_VERSION_MAX" : {
"MAJOR" : 1,
"MINOR" : 1,
"PATCH" : 2
"PATCH" : 3
}
}

Binary file not shown.
Binary file modified KerbalJointReinforcement/KerbalJointReinforcement.v12.suo
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Kerbal Joint Reinforcement, v3.1.7
Kerbal Joint Reinforcement, v3.2.0
Copyright 2015, Michael Ferrara, aka Ferram4
This file is part of Kerbal Joint Reinforcement.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Kerbal Joint Reinforcement, v3.1.7
Kerbal Joint Reinforcement, v3.2.0
Copyright 2015, Michael Ferrara, aka Ferram4
This file is part of Kerbal Joint Reinforcement.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Kerbal Joint Reinforcement, v3.1.7
Kerbal Joint Reinforcement, v3.2.0
Copyright 2015, Michael Ferrara, aka Ferram4
This file is part of Kerbal Joint Reinforcement.
Expand Down
28 changes: 11 additions & 17 deletions KerbalJointReinforcement/KerbalJointReinforcement/KJRManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Kerbal Joint Reinforcement, v3.1.7
Kerbal Joint Reinforcement, v3.2.0
Copyright 2015, Michael Ferrara, aka Ferram4
This file is part of Kerbal Joint Reinforcement.
Expand Down Expand Up @@ -36,7 +36,6 @@ public class KJRManager : MonoBehaviour

FloatCurve physicsEasingCurve = new FloatCurve();
int numTicksForEasing = 70;
int debugJointCount = 0;

public void Awake()
{
Expand All @@ -59,7 +58,7 @@ public void Start()

physicsEasingCurve.Add(numTicksForEasing, 1);
physicsEasingCurve.Add(0, 0);

}

public void OnDestroy()
Expand Down Expand Up @@ -231,11 +230,10 @@ public void FixedUpdate()
{
if (FlightGlobals.ready && FlightGlobals.Vessels != null)
{
List<Vessel> removeVessels = new List<Vessel>();
List<Vessel> tmpList = new List<Vessel>(vesselOffRailsTick.Keys);
foreach(Vessel v in tmpList)
for(int i = 0; i < updatedVessels.Count; ++i)
{
if (v == null)
Vessel v = updatedVessels[i];
if (v == null || !vesselOffRailsTick.ContainsKey(v))
continue;

int tick = vesselOffRailsTick[v];
Expand Down Expand Up @@ -320,7 +318,7 @@ public void FixedUpdate()
p.attachJoint.SetUnbreakable(false);
}

removeVessels.Add(v);
vesselOffRailsTick.Remove(v);
if (InputLockManager.GetControlLock("KJRLoadLock") == ControlTypes.ALL_SHIP_CONTROLS)
InputLockManager.RemoveControlLock("KJRLoadLock");
}
Expand All @@ -333,13 +331,11 @@ public void FixedUpdate()
p.attachJoint.SetUnbreakable(false);
}

removeVessels.Add(v);
vesselOffRailsTick.Remove(v);
if (InputLockManager.GetControlLock("KJRLoadLock") == ControlTypes.ALL_SHIP_CONTROLS)
InputLockManager.RemoveControlLock("KJRLoadLock");
}
}
foreach (Vessel v in removeVessels)
vesselOffRailsTick.Remove(v);
}
}

Expand Down Expand Up @@ -554,8 +550,8 @@ private void UpdatePartJoint(Part p)
}


float breakForce = p.breakingForce * KJRJointUtils.breakForceMultiplier;
float breakTorque = p.breakingTorque * KJRJointUtils.breakTorqueMultiplier;
float breakForce = Math.Min(p.breakingForce, connectedPart.breakingForce) * KJRJointUtils.breakForceMultiplier;
float breakTorque = Math.Min(p.breakingTorque, connectedPart.breakingTorque) * KJRJointUtils.breakTorqueMultiplier;
Vector3 anchor = j.anchor;
Vector3 connectedAnchor = j.connectedAnchor;
Vector3 axis = j.axis;
Expand Down Expand Up @@ -668,11 +664,10 @@ private void UpdatePartJoint(Part p)

breakForce = Mathf.Max(KJRJointUtils.breakStrengthPerArea * area, breakForce);
breakTorque = Mathf.Max(KJRJointUtils.breakTorquePerMOI * momentOfInertia, breakTorque);


JointDrive angDrive = j.angularXDrive;
angDrive.positionSpring = Mathf.Max(momentOfInertia * KJRJointUtils.angularDriveSpring, angDrive.positionSpring);
angDrive.positionDamper = Mathf.Max(momentOfInertia * KJRJointUtils.angularDriveDamper, angDrive.positionDamper);
angDrive.positionDamper = Mathf.Max(momentOfInertia * KJRJointUtils.angularDriveDamper * 0.1f, angDrive.positionDamper);
angDrive.maximumForce = breakTorque;
/*float moi_avg = p.rb.inertiaTensor.magnitude;
Expand All @@ -690,7 +685,6 @@ private void UpdatePartJoint(Part p)
linDrive.maximumForce = breakForce;
j.xDrive = j.yDrive = j.zDrive = linDrive;


SoftJointLimit lim = new SoftJointLimit();
lim.limit = 0;
lim.bounciness = 0;
Expand Down Expand Up @@ -772,7 +766,7 @@ private void UpdatePartJoint(Part p)
}
else
massRatioBelowThreshold = true;
} while (!massRatioBelowThreshold && numPartsFurther < 5);
} while (!massRatioBelowThreshold);// && numPartsFurther < 5);

if (connectedRb != null && !multiJointManager.CheckMultiJointBetweenParts(p, newConnectedPart))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Kerbal Joint Reinforcement, v3.1.7
Kerbal Joint Reinforcement, v3.2.0
Copyright 2015, Michael Ferrara, aka Ferram4
This file is part of Kerbal Joint Reinforcement.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\Games\KSP 1.1\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>..\..\..\..\..\Games\KSP 1.1.3\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="KSPUtil, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\Games\KSP 1.1\KSP_x64_Data\Managed\KSPUtil.dll</HintPath>
<HintPath>..\..\..\..\..\Games\KSP 1.1.3\KSP_x64_Data\Managed\KSPUtil.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\Games\KSP 1.1\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>..\..\..\..\..\Games\KSP 1.1.3\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>..\..\..\..\..\Games\KSP 1.1\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
<HintPath>..\..\..\..\..\Games\KSP 1.1.3\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,22 @@ C:\Users\ferram4\Documents\Visual Studio 2010\Projects\jointfix\jointfix\bin\Deb
C:\Users\ferram4\Documents\Visual Studio 2010\Projects\jointfix\jointfix\obj\Debug\ResolveAssemblyReference.cache
C:\Users\ferram4\Documents\Visual Studio 2010\Projects\jointfix\jointfix\obj\Debug\KerbalJointReinforcement.dll
C:\Users\ferram4\Documents\Visual Studio 2010\Projects\jointfix\jointfix\obj\Debug\KerbalJointReinforcement.pdb
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\KerbalJointReinforcement.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\KerbalJointReinforcement.pdb
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\Assembly-CSharp.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\KSPUtil.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\UnityEngine.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\UnityEngine.UI.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\Assembly-CSharp-firstpass.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\SaveUpgradePipeline.Core.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\TrackIRUnity.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\KSPAssets.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\System.Xml.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\Mono.Cecil.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\Vectrosity.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\TDx.TDxInput.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\Mono.Security.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\bin\Debug\UnityEngine.xml
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\obj\Debug\KerbalJointReinforcement.csprojResolveAssemblyReference.cache
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\obj\Debug\KerbalJointReinforcement.dll
C:\Users\ferram4\Kerbal-Joint-Reinforcement\KerbalJointReinforcement\KerbalJointReinforcement\obj\Debug\KerbalJointReinforcement.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Kerbal Joint Reinforcement, v3.1.7
Kerbal Joint Reinforcement, v3.2.0
==========================

Physics stabilizer plugin for Kerbal Space Program
Expand Down Expand Up @@ -119,6 +119,11 @@ These types are currently not used, but removing the a in front of them will cau
***********************
****** CHANGELOG ******
***********************
v3.2.0
Features
--Recompile to ensure KSP 1.1.3 compatibility
--Change multi-part-joint system to stabilize space stations and similar vehicles with very large masses connected by very flexy parts

v3.1.7
Features
--Recompile to ensure KSP 1.1.2 compatibility, especially within CompatibilityChecker utility
Expand Down

0 comments on commit 360ac60

Please sign in to comment.