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:
@@ -39,7 +39,9 @@ namespace OpenRA.Mods.RA.Traits
|
||||
if (disguise.AsSprite != intendedSprite)
|
||||
{
|
||||
intendedSprite = disguise.AsSprite;
|
||||
DefaultAnimation.ChangeImage(intendedSprite ?? rs.GetImage(self), info.StandSequences.Random(Game.CosmeticRandom));
|
||||
var sequence = DefaultAnimation.GetRandomExistingSequence(info.StandSequences, Game.CosmeticRandom);
|
||||
if (sequence != null)
|
||||
DefaultAnimation.ChangeImage(intendedSprite ?? rs.GetImage(self), sequence);
|
||||
rs.UpdatePalette();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user