This commit is contained in:
Chris Forbes
2009-12-05 15:34:53 +13:00
parent 3294956c2f
commit 1faa2ae0b3
4 changed files with 42 additions and 8 deletions

View File

@@ -17,6 +17,9 @@ namespace OpenRa.Game
if (liveclips.Count == 0)
liveclips.AddRange(clips);
if (liveclips.Count == 0)
return null; /* avoid crashing if there's no clips at all */
var i = Game.CosmeticRandom.Next(liveclips.Count);
var s = liveclips[i];
liveclips.RemoveAt(i);