Skip to content

Commit

Permalink
Update SpaceCenterManagement.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Clayell authored Feb 6, 2025
1 parent 2b962c0 commit ff35500
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/RP0/SpaceCenter/SpaceCenterManagement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ private static IEnumerator SetSimOrbit(SimulationParams simParams)
double sma = simParams.SimOrbitAltitude + body.Radius;
double ecc = 0.0000001; // Just a really smol value to prevent Ap and Pe from flickering around
RP0Debug.Log($"Moving vessel to orbit. {body.bodyName}:{simParams.SimOrbitAltitude}:{simParams.SimInclination}");
FlightGlobals.fetch.SetShipOrbit(body.flightGlobalsIndex, ecc, sma, simParams.SimInclination, simParams.SimLAN, 0.0, 0.0, 0.0);
FlightGlobals.fetch.SetShipOrbit(body.flightGlobalsIndex, ecc, sma, simParams.SimInclination, simParams.SimLAN, simParams.SimMNA, simParams.SimArgPe, 0.0); // selBodyIndex, ecc, sma, inc, LAN, mna, argPe, ObT
FloatingOrigin.ResetTerrainShaderOffset();
}
else
Expand All @@ -1311,7 +1311,7 @@ private static IEnumerator SetSimOrbit(SimulationParams simParams)
double sma = (ra + rp) / 2;
double ecc = (ra - rp) / (ra + rp);
RP0Debug.Log($"Moving vessel to orbit. {body.bodyName}:{simParams.SimOrbitPe}/{simParams.SimOrbitAp}:{simParams.SimInclination}");
FlightGlobals.fetch.SetShipOrbit(body.flightGlobalsIndex, ecc, sma, simParams.SimInclination, simParams.SimLAN, Math.PI, 0.0, 0.0);
FlightGlobals.fetch.SetShipOrbit(body.flightGlobalsIndex, ecc, sma, simParams.SimInclination, simParams.SimLAN, simParams.SimMNA, simParams.SimArgPe, 0.0); // selBodyIndex, ecc, sma, inc, LAN, mna, argPe, ObT
FloatingOrigin.ResetTerrainShaderOffset();
}
}
Expand Down

0 comments on commit ff35500

Please sign in to comment.