Added final game tick to replay meta data for completion percentage on replay.

This commit is contained in:
Jeremy
2018-12-22 22:05:52 -05:00
committed by Oliver Brakmann
parent 863091d5cc
commit 85a97998aa
4 changed files with 5 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ namespace OpenRA
public string MapUid;
public string MapTitle;
public int FinalGameTick;
/// <summary>Game start timestamp (when the recoding started).</summary>
public DateTime StartTimeUtc;

View File

@@ -33,6 +33,7 @@ namespace OpenRA.Network
public int LocalClientId { get { return 0; } }
public ConnectionState ConnectionState { get { return ConnectionState.Connected; } }
public readonly int TickCount;
public readonly int FinalGameTick;
public readonly bool IsValid;
public readonly Session LobbyInfo;
public readonly string Filename;
@@ -40,6 +41,7 @@ namespace OpenRA.Network
public ReplayConnection(string replayFilename)
{
Filename = replayFilename;
FinalGameTick = ReplayMetadata.Read(replayFilename).GameInfo.FinalGameTick;
// Parse replay data into a struct that can be fed to the game in chunks
// to avoid issues with all immediate orders being resolved on the first tick.

View File

@@ -66,7 +66,7 @@ namespace OpenRA
foreach (var t in WorldActor.TraitsImplementing<IGameOver>())
t.GameOver(this);
gameInfo.FinalGameTick = WorldTick;
GameOver();
}
}