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: b700fc7bc6de
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e7082655e144
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 23, 2017

  1. Copy the full SHA
    10d5e88 View commit details
  2. Merge pull request #1282 from eggrobin/rendering-in-career

    Fix a bug which prevented trajectory rendering in career mode
    pleroy authored Mar 23, 2017
    Copy the full SHA
    e708265 View commit details
Showing with 16 additions and 3 deletions.
  1. +16 −3 ksp_plugin_adapter/ksp_plugin_adapter.cs
19 changes: 16 additions & 3 deletions ksp_plugin_adapter/ksp_plugin_adapter.cs
Original file line number Diff line number Diff line change
@@ -1080,10 +1080,14 @@ private void RotateGalaxyCube() {
}

private void RemoveStockTrajectoriesIfNeeded(Vessel vessel) {
vessel.patchedConicRenderer.relativityMode =
PatchRendering.RelativityMode.RELATIVE;
if (vessel.patchedConicRenderer != null) {
vessel.patchedConicRenderer.relativityMode =
PatchRendering.RelativityMode.RELATIVE;
}

if (display_patched_conics_) {
if (!vessel.patchedConicRenderer.enabled) {
if (vessel.patchedConicRenderer != null &&
!vessel.patchedConicRenderer.enabled) {
vessel.patchedConicRenderer.enabled = true;
}
} else {
@@ -1094,6 +1098,15 @@ private void RemoveStockTrajectoriesIfNeeded(Vessel vessel) {
vessel.orbitDriver.Renderer.drawMode = OrbitRenderer.DrawMode.OFF;
vessel.orbitDriver.Renderer.drawIcons = OrbitRenderer.DrawIcons.OBJ;
}

if (vessel.patchedConicRenderer == null) {
// vessel.patchedConicRenderer may be null when in career mode, if
// patched conics have yet to be unlocked. In that case there is
// nothing to remove. Note that Principia doesn't care about unlocks
// and always displays all the information it can.
return;
}

vessel.patchedConicRenderer.enabled = false;
foreach (PatchRendering patch_rendering in
vessel.patchedConicRenderer.patchRenders) {