Skip to content

Commit 0892ff5

Browse files
committed
Override proceeding to Engine Ready when triggered internally
1 parent a4dc2a6 commit 0892ff5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

MonkeyLoader.Resonite.Integration/LoadProgressReporter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public sealed class LoadProgressReporter : Monkey<LoadProgressReporter>
2424
{
2525
private const string RendererProgressWrapperTypeName = "FrooxEngine.RendererInitProgressWrapper, FrooxEngine";
2626
private static bool _advancedToReady;
27+
private static bool _overrideProceedToReady;
2728
private static int? _totalFixedPhaseCount;
2829

2930
/// <summary>
@@ -69,7 +70,7 @@ public static int? TotalFixedPhaseCount
6970
private set => _totalFixedPhaseCount = value;
7071
}
7172

72-
private static bool? CanProgressToReady => !Available ? null : FixedPhaseIndex >= TotalFixedPhaseCount;
73+
private static bool? CanProgressToReady => !Available ? null : FixedPhaseIndex >= TotalFixedPhaseCount || _overrideProceedToReady;
7374
private static float InternalTotalFixedPhaseCount => _totalFixedPhaseCount!.Value;
7475

7576
/// <summary>
@@ -258,7 +259,9 @@ internal static bool EngineReady()
258259
if (!CanProgressToReady.Value)
259260
Logger.Warn(() => $"Proceeding to Engine Ready while fixed phase progress is too low. Current: {FixedPhaseIndex} / {TotalFixedPhaseCount}");
260261

262+
_overrideProceedToReady = true;
261263
LoadProgressIndicator.EngineReady();
264+
262265
return true;
263266
}
264267

0 commit comments

Comments
 (0)