From 96163916a2d54db08551459ecc1ac6337959c01f Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Sat, 9 Dec 2023 11:01:16 -0800 Subject: [PATCH] Try to remap old ascent settings to not throw cast errors Signed-off-by: Lamont Granquist --- MechJeb2/MechJebModuleAscentSettings.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MechJeb2/MechJebModuleAscentSettings.cs b/MechJeb2/MechJebModuleAscentSettings.cs index 44617b14f..c67c52813 100644 --- a/MechJeb2/MechJebModuleAscentSettings.cs +++ b/MechJeb2/MechJebModuleAscentSettings.cs @@ -65,7 +65,14 @@ public MechJebModuleAscentSettings(MechJebCore core) : base(core) public AscentType AscentType { - get => (AscentType)_ascentTypeInteger; + get + { + // intended to be temporary fix for deletion of the stock-style gravity turn and + // remapping the old PVG=2 mapping to PVG=1 + if (_ascentTypeInteger > 1) + _ascentTypeInteger = 1; + return (AscentType)_ascentTypeInteger; + } set { _ascentTypeInteger = (int)value;