Change Game.RunTime to a long to prevent overflow.

This commit is contained in:
RoosterDragon
2016-09-20 19:06:10 +01:00
parent 57ceda3025
commit 2ffea5db54
12 changed files with 25 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Primitives
{
readonly List<DelayedAction> actions = new List<DelayedAction>();
public void Add(Action a, int desiredTime)
public void Add(Action a, long desiredTime)
{
if (a == null)
throw new ArgumentNullException("a");
@@ -34,7 +34,7 @@ namespace OpenRA.Primitives
}
}
public void PerformActions(int currentTime)
public void PerformActions(long currentTime)
{
DelayedAction[] pendingActions;
lock (actions)
@@ -67,10 +67,10 @@ namespace OpenRA.Primitives
struct DelayedAction : IComparable<DelayedAction>
{
public readonly int Time;
public readonly long Time;
public readonly Action Action;
public DelayedAction(Action action, int time)
public DelayedAction(Action action, long time)
{
Action = action;
Time = time;