Skip to content

Commit

Permalink
Merge pull request #111 from MagicSmokeIndustries/develop
Browse files Browse the repository at this point in the history
IR 2.0.4 fixes
  • Loading branch information
ZiwKerman committed May 15, 2016
2 parents 81db324 + 120dc6a commit 15d7d4d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ bld/
[Oo]bj/

*.userprefs
InfernalRobotics/.vs/
*.scgdat
2 changes: 1 addition & 1 deletion InfernalRobotics.version
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"VERSION": {
"MAJOR": 2,
"MINOR": 0,
"PATCH": 3
"PATCH": 4
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
Binary file modified InfernalRobotics/.vs/InfernalRobotics/InfernalRobotics.scgdat
Binary file not shown.
10 changes: 8 additions & 2 deletions InfernalRobotics/InfernalRobotics/Command/ServoController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,16 @@ public static void SetWheelAutoStruts(bool value, Vessel v)
var activeVesselWheels = v.FindPartModulesImplementing<ModuleWheelBase>();
foreach(var mwb in activeVesselWheels)
{
mwb.autoStrut = value;
if (value)
{
mwb.CycleWheelStrut();
if(!mwb.autoStrut) //we only need to Cycle once
mwb.CycleWheelStrut();
}
else
mwb.ReleaseWheelStrut();

mwb.autoStrut = value;

}
}

Expand All @@ -370,6 +373,9 @@ private void FixedUpdate()
loadedVesselCounter = FlightGlobals.Vessels.Count(v => v.loaded);
}

if (ServoGroups == null)
return;

//check if all servos stopped running and enable the struts, otherwise disable wheel autostruts
var anyActive = new Dictionary<Vessel, bool>();

Expand Down
1 change: 1 addition & 0 deletions InfernalRobotics/InfernalRobotics/Gui/WindowManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,7 @@ public void ShowServoAdvancedMode(IServo servo, bool value)
{
var servoToggle = servoControls.GetChild("ServoShowOtherFieldsToggle").GetComponent<Toggle>();
servoToggle.onValueChanged.Invoke(value);
servoToggle.isOn = value;
}
}
public void RebuildUI()
Expand Down
10 changes: 4 additions & 6 deletions InfernalRobotics/InfernalRobotics/Module/ModuleIRServo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,8 @@ protected virtual void AttachToParent()
if (rotateJoint)
{
fix.RotateAround(transform.TransformPoint(rotatePivot), transform.TransformDirection(rotateAxis),
(invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? -1 : 1) : -1) *
rotation);
//(invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? -1 : 1) : -1) *
-rotation);
}
else if (translateJoint)
{
Expand Down Expand Up @@ -1087,15 +1087,13 @@ protected virtual void UpdatePosition()
if (joint != null)
{
joint.targetRotation =
Quaternion.AngleAxis(
(invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? 1 : -1) : 1)*
(rotation - rotationDelta), rotateAxis);
Quaternion.AngleAxis((rotation - rotationDelta), rotateAxis);
}
else if (RotateModelTransform != null)
{
Quaternion curRot =
Quaternion.AngleAxis(
(invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? 1 : -1) : 1)*
//(invertSymmetry ? ((part.symmetryCounterparts.Count != 1) ? 1 : -1) : -1)* //obsolete
rotation, rotateAxis);
RotateModelTransform.localRotation = curRot;
}
Expand Down
6 changes: 3 additions & 3 deletions InfernalRobotics/InfernalRobotics/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[assembly: AssemblyTitle("InfernalRobotics")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("MagicSmokeIndustries")]
[assembly: AssemblyProduct("InfernalRobotics")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
Expand All @@ -35,5 +35,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.0.4.0")]
[assembly: AssemblyFileVersion("2.0.4.0")]

0 comments on commit 15d7d4d

Please sign in to comment.