From 39b7db27030ec9964211aad794a47a4d0a5a5444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 27 Jan 2020 22:13:35 +0100 Subject: [PATCH] Allow repetition of frames in sequence setups. --- OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs b/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs index 3167f29006..3bbf417900 100644 --- a/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs +++ b/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs @@ -204,7 +204,7 @@ namespace OpenRA.Mods.Common.Graphics "{0}: Sequence {1}.{2}: Length must be <= Frames.Length" .F(info.Nodes[0].Location, sequence, animation)); - if (Start < 0 || Start + (Facings - 1) * Stride + Length > frameCount) + if (Frames == null && (Start < 0 || Start + (Facings - 1) * Stride + Length > frameCount)) throw new InvalidOperationException( "{5}: Sequence {0}.{1} uses frames [{2}..{3}], but only 0..{4} actually exist" .F(sequence, animation, Start, Start + (Facings - 1) * Stride + Length - 1, frameCount - 1,