Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf2bb92e6239
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 36c52652005f
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 15, 2017

  1. set a sane default frame; this is probably a stopgap for per-vessel p…

    …ersisted plotting frames.
    eggrobin committed Mar 15, 2017
    Copy the full SHA
    9bf6f20 View commit details
  2. Copy the full SHA
    453b13c View commit details
  3. Merge pull request #1262 from eggrobin/default-frame

    Do not default to heliocentric
    pleroy authored Mar 15, 2017
    Copy the full SHA
    36c5265 View commit details
Showing with 11 additions and 0 deletions.
  1. +11 −0 ksp_plugin_adapter/ksp_plugin_adapter.cs
11 changes: 11 additions & 0 deletions ksp_plugin_adapter/ksp_plugin_adapter.cs
Original file line number Diff line number Diff line change
@@ -83,6 +83,10 @@ public partial class PrincipiaPluginAdapter
[KSPField(isPersistant = true)]
private bool must_record_journal_ = false;

// Whether the plotting frame must be set to something convenient at the next
// opportunity.
private bool must_set_plotting_frame_ = false;

// Whether a journal is currently being recorded.
private static bool journaling_;
#if CRASH_BUTTON
@@ -432,6 +436,7 @@ public override void OnLoad(ConfigNode node) {
plugin_,
UpdateRenderingFrame,
"Plotting frame"));
must_set_plotting_frame_ = true;
flight_planner_.reset(new FlightPlanner(this, plugin_));

plugin_construction_ = DateTime.Now;
@@ -667,6 +672,11 @@ private void FixedUpdate() {
Log.Info("Setting GameSettings.ORBIT_WARP_DOWN_AT_SOI to false");
GameSettings.ORBIT_WARP_DOWN_AT_SOI = false;
}
if (must_set_plotting_frame_ && FlightGlobals.currentMainBody != null) {
must_set_plotting_frame_ = false;
plotting_frame_selector_.reset(new ReferenceFrameSelector(
this, plugin_, UpdateRenderingFrame, "Plotting frame"));
}

if (PluginRunning()) {
double universal_time = Planetarium.GetUniversalTime();
@@ -1664,6 +1674,7 @@ private void ResetPlugin() {
plugin_,
UpdateRenderingFrame,
"Plotting frame"));
must_set_plotting_frame_ = true;
flight_planner_.reset(new FlightPlanner(this, plugin_));
}