-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DisableMapOrbitsInFlight : Fix for #59
- Loading branch information
1 parent
52131d3
commit 7b94465
Showing
4 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// see https://github.com/KSPModdingLibs/KSPCommunityFixes/issues/59 | ||
|
||
using System; | ||
using HarmonyLib; | ||
using System.Collections.Generic; | ||
|
||
namespace KSPCommunityFixes.Performance | ||
{ | ||
class DisableMapOrbitsInFlight : BasePatch | ||
{ | ||
protected override Version VersionMin => new Version(1, 8, 0); | ||
|
||
protected override void ApplyPatches(List<PatchInfo> patches) | ||
{ | ||
patches.Add(new PatchInfo( | ||
PatchMethodType.Prefix, | ||
AccessTools.Method(typeof(OrbitRendererBase), nameof(OrbitRendererBase.LateUpdate)), | ||
this)); | ||
} | ||
|
||
static bool OrbitRendererBase_LateUpdate_Prefix() | ||
{ | ||
return MapView.fetch.updateMap; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters