Skip to content

Commit

Permalink
Example
Browse files Browse the repository at this point in the history
  • Loading branch information
pchote committed Jun 26, 2022
1 parent 6eaa79a commit 2dac6b9
Show file tree
Hide file tree
Showing 4 changed files with 231 additions and 86 deletions.
4 changes: 2 additions & 2 deletions OpenRA.Mods.Cnc/Graphics/ClassicSpriteSequence.cs
Expand Up @@ -40,14 +40,14 @@ public ClassicSpriteSequence(ModData modData, string tileSet, SpriteCache cache,
var d = info.ToDictionary();
UseClassicFacings = LoadField(d, nameof(UseClassicFacings), UseClassicFacings);

if (UseClassicFacings && Facings != 32)
if (UseClassicFacings && facings != 32)
throw new InvalidOperationException(
$"{info.Nodes[0].Location}: Sequence {sequence}.{animation}: UseClassicFacings is only valid for 32 facings");
}

protected override int GetFacingFrameOffset(WAngle facing)
{
return UseClassicFacings ? Util.ClassicIndexFacing(facing, Facings) : Common.Util.IndexFacing(facing, Facings);
return UseClassicFacings ? Util.ClassicIndexFacing(facing, facings) : Common.Util.IndexFacing(facing, facings);
}
}
}

0 comments on commit 2dac6b9

Please sign in to comment.