Skip to content

Commit

Permalink
More minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiwKerman committed Dec 15, 2016
1 parent c77ba7a commit 230b3d6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions InfernalRobotics/InfernalRobotics/Module/ModuleIRServo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ModuleIRServo : PartModule, IRescalable, IJointLockState

//BEGIN Mechanism related KSPFields
[KSPField(isPersistant = true)] public bool freeMoving = false;
[KSPField(isPersistant = true)] public bool isMotionLock;
[KSPField(isPersistant = true)] public bool isMotionLock = false;
[KSPField(isPersistant = true)] public bool limitTweakable = false;
[KSPField(isPersistant = true)] public bool limitTweakableFlag = false;

Expand Down Expand Up @@ -487,6 +487,8 @@ public void OnVesselGoOffRails (Vessel v)

Logger.Log ("[OnVesselGoOffRails] Started for "+ part.name, Logger.Level.Debug);

Logger.Log ("[OnVesselGoOffRails] Rebuilding Attachments", Logger.Level.Debug);
BuildAttachments ();

if (joint)
{
Expand Down Expand Up @@ -561,17 +563,14 @@ public override void OnLoad(ConfigNode config)
{
Logger.Log("[OnLoad] Start", Logger.Level.Debug);

base.OnLoad (config);
//base.OnLoad (config);

//save persistent rotation/translation data, because the joint will be initialized at current position.
rotationDelta = rotation;
translationDelta = translation;

InitModule();

Logger.Log ("[OnLoad] Rebuilding Attachments", Logger.Level.Debug);
BuildAttachments ();

Logger.Log("[OnLoad] End", Logger.Level.Debug);
}
/// <summary>
Expand Down Expand Up @@ -773,7 +772,7 @@ public override void OnStart(StartState state)
if (ModelTransform == null)
Logger.Log("[MMT] OnStart ModelTransform is null", Logger.Level.Warning);

//BuildAttachments(); //moved to OnLoad
BuildAttachments();

if (limitTweakable)
{
Expand Down

0 comments on commit 230b3d6

Please sign in to comment.