Skip to content

Commit

Permalink
error feedback for missing transforms in flight stick prop
Browse files Browse the repository at this point in the history
  • Loading branch information
snjo committed Jul 27, 2014
1 parent 3a56834 commit 722e99a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Firespitter/cockpit/FSinternalPropRotator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class FSinternalPropRotator : InternalModule
private float smoothBrake = 0f;
private int brakeActionInt = 0;
private bool firstRun = true;
Firespitter.info.FSdebugMessages debug = new Firespitter.info.FSdebugMessages(true, "FSinternalPropRotator");



Expand All @@ -50,22 +51,28 @@ private void rotateParts(Vector3 rotation)

public override void OnAwake()
{
if (this.pitchTransform != null) return;
if (pitchTransform != null) return;

if (pitchObject != "none")
{
usePitch = true;
this.pitchTransform = base.internalProp.FindModelTransform(this.pitchObject);
pitchTransform = base.internalProp.FindModelTransform(pitchObject);
if (pitchTransform == null)
debug.debugMessage("Could not find pitch transform " + pitchObject);
}
if (rollObject != "none")
{
useRoll = true;
this.rollTransform = base.internalProp.FindModelTransform(this.rollObject);
rollTransform = base.internalProp.FindModelTransform(rollObject);
if (rollTransform == null)
debug.debugMessage("Could not find roll transform " + rollTransform);
}
if (yawObject != "none")
{
useYaw = true;
this.yawTransform = base.internalProp.FindModelTransform(this.yawObject);
yawTransform = base.internalProp.FindModelTransform(yawObject);
if (yawTransform == null)
debug.debugMessage("Could not find yaw transform " + yawObject);
}

brakeActionInt = BaseAction.GetGroupIndex(KSPActionGroup.Brakes);
Expand Down

0 comments on commit 722e99a

Please sign in to comment.