Merge pull request #7979 from Mailaender/d2k-sand-blendmode

Fixed the Dune 2000 harvester sand out animation
This commit is contained in:
abcdefg30
2015-05-14 19:21:06 +02:00
9 changed files with 28 additions and 35 deletions

View File

@@ -119,12 +119,13 @@ namespace OpenRA.Mods.Common.Graphics
var offset = LoadField<float2>(d, "Offset", float2.Zero);
var blendMode = LoadField<BlendMode>(d, "BlendMode", BlendMode.Alpha);
var alpha = LoadField<float>(d, "Alpha", 1f);
// Apply offset to each sprite in the sequence
// Different sequences may apply different offsets to the same frame
var src = GetSpriteSrc(modData, tileSet, sequence, animation, info.Value, d);
sprites = cache[src].Select(
s => new Sprite(s.Sheet, s.Bounds, s.Offset + offset, s.Channel, blendMode)).ToArray();
s => new Sprite(s.Sheet, s.Bounds, s.Offset + offset, s.Channel, blendMode, alpha)).ToArray();
MiniYaml length;
if (d.TryGetValue("Length", out length) && length.Value == "*")