From b57a26a7112d19fdee27c99028092463e550119c Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sun, 27 Jan 2019 18:57:47 +0500 Subject: More advanced textures animation support --- src/AssetManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/AssetManager.cpp') diff --git a/src/AssetManager.cpp b/src/AssetManager.cpp index 9fd49bb..71800d7 100644 --- a/src/AssetManager.cpp +++ b/src/AssetManager.cpp @@ -508,7 +508,6 @@ void ParseBlockModels() { AssetTexture *assetTexture = AssetManager::GetAsset(textureName); texture = atlas->GetTexture(assetTexture->id); textureFrames = assetTexture->frames; - texture.h /= textureFrames; if (!(face.second.uv == BlockModel::ElementData::FaceData::Uv{ 0,16,0,16 }) && !(face.second.uv == BlockModel::ElementData::FaceData::Uv{ 0,0,0,0 }) && !(face.second.uv == BlockModel::ElementData::FaceData::Uv{ 0,0,16,16 })) { @@ -533,6 +532,7 @@ void ParseBlockModels() { } parsedFace.texture = glm::vec4{ texture.x,texture.y,texture.w,texture.h }; parsedFace.layer = texture.layer; + parsedFace.frames = textureFrames; if (face.second.tintIndex) parsedFace.color = glm::vec3(0.275, 0.63, 0.1); else -- cgit v1.2.3