Reset FPS counter on game start.

This avoids this displayed counter being dragged down by lower FPS during loading prior to the game starting.
This commit is contained in:
RoosterDragon
2023-11-14 19:32:10 +00:00
committed by Gustas
parent 58e447d8d0
commit 399cef8fb2
2 changed files with 29 additions and 2 deletions

View File

@@ -180,6 +180,7 @@ namespace OpenRA
}
public static event Action BeforeGameStart = () => { };
public static event Action AfterGameStart = () => { };
internal static void StartGame(string mapUID, WorldType type)
{
// Dispose of the old world before creating a new one.
@@ -227,6 +228,8 @@ namespace OpenRA
// PostLoadComplete is designed for anything that should trigger at the very end of loading.
// e.g. audio notifications that the game is starting.
OrderManager.World.PostLoadComplete(worldRenderer);
AfterGameStart();
}
public static void RestartGame()