Fixed PNG frame count calculation
This fixes the order of operations and rounding issue, making it columns * rows.
This commit is contained in:
committed by
Matthias Mailänder
parent
f03841c4e4
commit
f1e8f9c9d0
@@ -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"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user