Skip to content

Revert ImageReader frameCount check #2754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Assets/Scripts/Utility/ImageReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
// Source Code: https://github.com/Interkarma/daggerfall-unity
// Original Author: Gavin Clayton ([email protected])
// Contributors:
//
// Contributors:
//
// Notes:
//

Expand Down Expand Up @@ -292,7 +292,7 @@ public static ImageData GetImageData(string filename, int record = 0, int frame
int archive = AssetInjection.TextureReplacement.FileNameToArchive(filename);
if (createTexture && AssetInjection.TextureReplacement.TryImportTexture(archive, record, frame, out imageData.texture))
createTexture = false;
if (createAllFrameTextures && AssetInjection.TextureReplacement.TryImportTexture(archive, record, out imageData.animatedTextures))
if (createAllFrameTextures && frameCount > 1 && AssetInjection.TextureReplacement.TryImportTexture(archive, record, out imageData.animatedTextures))
createAllFrameTextures = false;

break;
Expand Down