avoid magic number for replay duration calculation
This commit is contained in:
@@ -75,7 +75,7 @@ namespace OpenRA
|
||||
public static int RenderFrame = 0;
|
||||
public static int NetFrameNumber { get { return orderManager.NetFrameNumber; } }
|
||||
public static int LocalTick { get { return orderManager.LocalFrameNumber; } }
|
||||
const int NetTickScale = 3; // 120ms net tick for 40ms local tick
|
||||
public const int NetTickScale = 3; // 120ms net tick for 40ms local tick
|
||||
|
||||
public static event Action<OrderManager> ConnectionStateChanged = _ => { };
|
||||
static ConnectionState lastConnectionState = ConnectionState.PreConnecting;
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Network;
|
||||
|
||||
namespace OpenRA.Network
|
||||
{
|
||||
/* a maze of twisty little hacks,... */
|
||||
/* HACK: a maze of twisty little hacks... */
|
||||
public class Replay
|
||||
{
|
||||
public readonly string Filename;
|
||||
@@ -49,7 +49,7 @@ namespace OpenRA.Network
|
||||
lastFrame = Math.Max(lastFrame, frame);
|
||||
});
|
||||
|
||||
Duration = lastFrame;
|
||||
Duration = lastFrame * Game.NetTickScale;
|
||||
LobbyInfo = lobbyInfo;
|
||||
}
|
||||
|
||||
@@ -66,4 +66,3 @@ namespace OpenRA.Network
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user