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

@@ -96,7 +96,7 @@ namespace OpenRA
// More accurate replacement for Environment.TickCount
static Stopwatch stopwatch = Stopwatch.StartNew();
public static int RunTime { get { return (int)stopwatch.ElapsedMilliseconds; } }
public static long RunTime { get { return stopwatch.ElapsedMilliseconds; } }
public static int RenderFrame = 0;
public static int NetFrameNumber { get { return OrderManager.NetFrameNumber; } }
@@ -735,7 +735,7 @@ namespace OpenRA
}
}
else
Thread.Sleep(nextUpdate - now);
Thread.Sleep((int)(nextUpdate - now));
}
}