Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 0b84405

Browse files
committed
Fix incorrect startup delay logic
1 parent c31e094 commit 0b84405

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/ExplorerCore.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,13 @@ public static void Init(IExplorerLoader loader)
6666
private static IEnumerator SetupCoroutine()
6767
{
6868
yield return null;
69-
70-
float start = Time.realtimeSinceStartup;
69+
float prevRealTime = Time.realtimeSinceStartup;
7170
float delay = ConfigManager.Startup_Delay_Time.Value;
72-
7371
while (delay > 0)
7472
{
75-
float diff = Math.Max(Time.deltaTime, Time.realtimeSinceStartup - start);
73+
float diff = Math.Max(Time.deltaTime, Time.realtimeSinceStartup - prevRealTime);
7674
delay -= diff;
75+
prevRealTime = Time.realtimeSinceStartup;
7776
yield return null;
7877
}
7978

0 commit comments

Comments
 (0)