Added final game tick to replay meta data for completion percentage on replay.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA
|
||||
|
||||
foreach (var t in WorldActor.TraitsImplementing<IGameOver>())
|
||||
t.GameOver(this);
|
||||
|
||||
gameInfo.FinalGameTick = WorldTick;
|
||||
GameOver();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user