fix: complete retail parity stability pass
This commit is contained in:
parent
d3df4cb20a
commit
f7aa8e0eb7
131 changed files with 7765 additions and 1190 deletions
|
|
@ -161,11 +161,18 @@ internal sealed class RuntimeSettingsController :
|
|||
Func<uint, bool>? characterOptionValue = null)
|
||||
{
|
||||
_storage = storage ?? throw new ArgumentNullException(nameof(storage));
|
||||
_resolveQuality = resolveQuality ?? ResolveQuality;
|
||||
Display = _storage.LoadDisplay();
|
||||
// Render.LandscapeDrawDistance is one of retail's actual quality
|
||||
// dimensions, not a menu index. Apply it to the production far tier
|
||||
// before environment overrides; ACDREAM_FAR_RADIUS therefore keeps
|
||||
// its documented highest precedence for diagnostic runs.
|
||||
_resolveQuality = resolveQuality
|
||||
?? (preset => ResolveQuality(
|
||||
preset,
|
||||
Display.LandscapeDrawDistance));
|
||||
_log = log ?? Console.WriteLine;
|
||||
_characterOptionValue = characterOptionValue;
|
||||
|
||||
Display = _storage.LoadDisplay();
|
||||
Audio = _storage.LoadAudio();
|
||||
Chat = _storage.LoadChat();
|
||||
_defaultCharacter = _storage.LoadCharacter(DefaultToonKey);
|
||||
|
|
@ -613,6 +620,35 @@ internal sealed class RuntimeSettingsController :
|
|||
/// <inheritdoc cref="ServerOptionsSeeded"/>
|
||||
public void NotifyServerOptionsSeeded() => ServerOptionsSeeded?.Invoke();
|
||||
|
||||
private static QualitySettings ResolveQuality(QualityPreset preset) =>
|
||||
QualitySettings.WithEnvOverrides(QualitySettings.From(preset));
|
||||
private static QualitySettings ResolveQuality(
|
||||
QualityPreset preset,
|
||||
int landscapeDrawDistance)
|
||||
{
|
||||
QualitySettings quality = ApplyLandscapeDrawDistance(
|
||||
QualitySettings.From(preset),
|
||||
landscapeDrawDistance);
|
||||
return QualitySettings.WithEnvOverrides(quality);
|
||||
}
|
||||
|
||||
internal static QualitySettings ApplyLandscapeDrawDistance(
|
||||
QualitySettings quality,
|
||||
int landscapeDrawDistance)
|
||||
{
|
||||
// Retail's enum contains 3,5,8,11,15,25 and @render accepts every
|
||||
// integer in [5,25]. Values outside the union's structural [3,25]
|
||||
// range can only come from an old/corrupt settings file, so preserve
|
||||
// the preset rather than constructing an invalid streaming window.
|
||||
if (landscapeDrawDistance is >= 3 and <= 25)
|
||||
{
|
||||
quality = quality with
|
||||
{
|
||||
NearRadius = Math.Min(
|
||||
quality.NearRadius,
|
||||
landscapeDrawDistance),
|
||||
FarRadius = landscapeDrawDistance,
|
||||
};
|
||||
}
|
||||
|
||||
return quality;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue