Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlightIntegratorPerf optimizations replacing previous FlightPerf patch #267

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions GameData/KSPCommunityFixes/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ KSP_COMMUNITY_FIXES
// Various small performance patches (volume normalizer, eva module checks)
MinorPerfTweaks = true

// General micro-optimization of FlightIntegrator and VesselPrecalculate, significantely increase
// framerate in large part count situations.
FlightPerf = true
// General micro-optimization of FlightIntegrator and VesselPrecalculate. This has a significant impact in
// large part count situations, and especially in atmospheric situations.
FlightIntegratorPerf = true

// General micro-optimization of floating origin shifts. Main benefit is in large particle count situations
// but this helps a bit in other cases as well.
Expand Down
7 changes: 7 additions & 0 deletions KSPCommunityFixes/KSPCommunityFixes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class KSPCommunityFixes : MonoBehaviour

public static KSPCommunityFixes Instance { get; private set; }

public static long FixedUpdateCount { get; private set; }

private static string modPath;
public static string ModPath
{
Expand Down Expand Up @@ -125,5 +127,10 @@ public void MMPostLoadCallback()
BasePatch.Patch(patchesType);
}
}

void FixedUpdate()
{
FixedUpdateCount++;
}
}
}
2 changes: 1 addition & 1 deletion KSPCommunityFixes/KSPCommunityFixes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<Compile Include="Performance\DragCubeGeneration.cs" />
<Compile Include="Performance\FasterPartFindTransform.cs" />
<Compile Include="Performance\FastLoader.cs" />
<Compile Include="Performance\FlightPerf.cs" />
<Compile Include="Performance\FlightIntegratorPerf.cs" />
<Compile Include="Performance\IMGUIOptimization.cs" />
<Compile Include="Performance\LocalizerPerf.cs" />
<Compile Include="Performance\LowerMinPhysicsDTPerFrame.cs" />
Expand Down
Loading
Loading