Skip to content

Commit

Permalink
Try to remap old ascent settings to not throw cast errors
Browse files Browse the repository at this point in the history
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed Dec 9, 2023
1 parent a50fce6 commit 9616391
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion MechJeb2/MechJebModuleAscentSettings.cs
Expand Up @@ -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;
Expand Down

0 comments on commit 9616391

Please sign in to comment.