mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 12:05:23 +01:00
unloading streaming stuff in custom systems (#1103)
## Improvements - do not load unnecessary bundles in custom systems. saves VRAM. does not affect RAM details stay visible does not seem to cause softlocks. works when going from custom to regular (you dont fall thru TH) seems to cause no extra errors in logs
This commit is contained in:
commit
31a6093a1b
@ -42,6 +42,16 @@ namespace NewHorizons.Handlers
|
||||
|
||||
public static void Init(List<NewHorizonsBody> bodies)
|
||||
{
|
||||
// TH gets preloaded in title screen. custom systems dont need this
|
||||
if (Main.Instance.CurrentStarSystem is not ("SolarSystem" or "EyeOfTheUniverse"))
|
||||
{
|
||||
foreach (var bundle in StreamingManager.s_activeBundles)
|
||||
{
|
||||
// save memory NOW instead of next frame when other stuff has loaded and taken memory
|
||||
bundle.UnloadImmediate();
|
||||
}
|
||||
}
|
||||
|
||||
// Start by destroying all planets if need be
|
||||
if (Main.SystemDict[Main.Instance.CurrentStarSystem].Config.destroyStockPlanets)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user