fix crash when disguising the spy as infantry without stand2

This commit is contained in:
Matthias Mailänder
2015-07-06 10:00:03 +02:00
parent 4acb096416
commit 41b488779a
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);
}
}
}