Merge pull request #8663 from Mailaender/disguise-stand2-crash

Fixed a crash when disguising the spy as infantry without stand2
This commit is contained in:
abcdefg30
2015-07-13 13:39:19 +02:00
3 changed files with 22 additions and 6 deletions

View File

@@ -10,6 +10,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Support;
namespace OpenRA.Graphics
{
@@ -199,5 +201,10 @@ namespace OpenRA.Graphics
{
return sequenceProvider.GetSequence(name, sequenceName);
}
public string GetRandomExistingSequence(string[] sequences, MersenneTwister random)
{
return sequences.Where(s => HasSequence(s)).RandomOrDefault(random);
}
}
}