From 8fde480b53111acee6c51a9027670b5f72e51fb1 Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Fri, 25 Aug 2023 17:30:00 -0400 Subject: [PATCH] Make nuclear pulse drive Principia-compatible Principia needs to inspect the forces applied to vessels. The issue is described here: https://forum.kerbalspaceprogram.com/topic/162200-wip181-191-1101-1110%E2%80%932-1122%E2%80%935-principia%E2%80%94version-jacobi-released-2023-08-16%E2%80%94n-body-and-extended-body-gravitation/?do=findComment&comment=3596092 --- Source/USITools/EnginesAndTanks/USI_PulseDrive.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/USITools/EnginesAndTanks/USI_PulseDrive.cs b/Source/USITools/EnginesAndTanks/USI_PulseDrive.cs index fbb00ee..4216922 100644 --- a/Source/USITools/EnginesAndTanks/USI_PulseDrive.cs +++ b/Source/USITools/EnginesAndTanks/USI_PulseDrive.cs @@ -189,7 +189,7 @@ public override void OnFixedUpdate() atmoModifier = (float)Math.Max(0, 1d - vessel.atmDensity); var thrustAmount = (float) (currentThrust*pulseCurve.Evaluate(curveTime)) * atmoModifier; - part.GetComponent().AddForceAtPosition(-t.forward * thrustAmount, t.position, ForceMode.Force); + part.AddForceAtPosition(-t.forward * thrustAmount, t.position, ForceMode.Force); part.AddThermalFlux(thrustAmount * heatMultiplier); } }