Skip to content

Commit 230b3d6

Browse files
committed
More minor bugfixes
1 parent c77ba7a commit 230b3d6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

InfernalRobotics/InfernalRobotics/Module/ModuleIRServo.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class ModuleIRServo : PartModule, IRescalable, IJointLockState
3333

3434
//BEGIN Mechanism related KSPFields
3535
[KSPField(isPersistant = true)] public bool freeMoving = false;
36-
[KSPField(isPersistant = true)] public bool isMotionLock;
36+
[KSPField(isPersistant = true)] public bool isMotionLock = false;
3737
[KSPField(isPersistant = true)] public bool limitTweakable = false;
3838
[KSPField(isPersistant = true)] public bool limitTweakableFlag = false;
3939

@@ -487,6 +487,8 @@ public void OnVesselGoOffRails (Vessel v)
487487

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

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

491493
if (joint)
492494
{
@@ -561,17 +563,14 @@ public override void OnLoad(ConfigNode config)
561563
{
562564
Logger.Log("[OnLoad] Start", Logger.Level.Debug);
563565

564-
base.OnLoad (config);
566+
//base.OnLoad (config);
565567

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

570572
InitModule();
571573

572-
Logger.Log ("[OnLoad] Rebuilding Attachments", Logger.Level.Debug);
573-
BuildAttachments ();
574-
575574
Logger.Log("[OnLoad] End", Logger.Level.Debug);
576575
}
577576
/// <summary>
@@ -773,7 +772,7 @@ public override void OnStart(StartState state)
773772
if (ModelTransform == null)
774773
Logger.Log("[MMT] OnStart ModelTransform is null", Logger.Level.Warning);
775774

776-
//BuildAttachments(); //moved to OnLoad
775+
BuildAttachments();
777776

778777
if (limitTweakable)
779778
{

0 commit comments

Comments
 (0)