Fixed PNG frame count calculation

This fixes the order of operations and rounding issue, making it columns * rows.
This commit is contained in:
atlimit8
2020-05-02 13:39:03 -05:00
committed by Matthias Mailänder
parent f03841c4e4
commit f1e8f9c9d0

View File

@@ -127,7 +127,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders
if (png.EmbeddedData.ContainsKey("FrameAmount"))
frameAmount = FieldLoader.GetValue<int>("FrameAmount", png.EmbeddedData["FrameAmount"]);
else
frameAmount = png.Width / frameSize.Width * png.Height / frameSize.Height;
frameAmount = (png.Width / frameSize.Width) * (png.Height / frameSize.Height);
}
else if (png.EmbeddedData.ContainsKey("FrameAmount"))
{