Fix some playerstatistics related crashes for other mods

This commit is contained in:
Scott_NZ
2013-02-23 00:12:20 +13:00
parent 6b636b166c
commit 3bc9e7d2e4
2 changed files with 10 additions and 7 deletions

View File

@@ -101,7 +101,7 @@ namespace OpenRA.Widgets
var xAxisSize = GetXAxisSize();
var yAxisSize = GetYAxisSize();
var maxValue = GetSeries().Select(p => p.Points).SelectMany(d => d).Max();
var maxValue = GetSeries().Select(p => p.Points).SelectMany(d => d).Concat(new[] { 0f }).Max();
var scale = 200 / Math.Max(5000, (float)Math.Ceiling(maxValue / 1000) * 1000);
var xStep = width / xAxisSize;