From 8d3b6a1d7a7fa12f064f97d25fb84a954bdf8abc Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Mon, 7 May 2018 12:26:26 -0700 Subject: [PATCH] Fixed texmap in files included with an offset. --- common/lc_library.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/lc_library.cpp b/common/lc_library.cpp index f9778400..0653800f 100644 --- a/common/lc_library.cpp +++ b/common/lc_library.cpp @@ -1983,6 +1983,10 @@ bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransf sscanf(Token, "%f %f %f %f %f %f %f %f %f %s", &Points[0].x, &Points[0].y, &Points[0].z, &Points[1].x, &Points[1].y, &Points[1].z, &Points[2].x, &Points[2].y, &Points[2].z, FileName); + Points[0] = lcMul31(Points[0], CurrentTransform); + Points[1] = lcMul31(Points[1], CurrentTransform); + Points[2] = lcMul31(Points[2], CurrentTransform); + CleanTextureName(FileName); lcLibraryTextureMap& Map = TextureStack.Add(); @@ -2013,6 +2017,10 @@ bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransf sscanf(Token, "%f %f %f %f %f %f %f %f %f %f %s", &Points[0].x, &Points[0].y, &Points[0].z, &Points[1].x, &Points[1].y, &Points[1].z, &Points[2].x, &Points[2].y, &Points[2].z, &Angle, FileName); + Points[0] = lcMul31(Points[0], CurrentTransform); + Points[1] = lcMul31(Points[1], CurrentTransform); + Points[2] = lcMul31(Points[2], CurrentTransform); + CleanTextureName(FileName); lcLibraryTextureMap& Map = TextureStack.Add(); @@ -2042,6 +2050,10 @@ bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransf sscanf(Token, "%f %f %f %f %f %f %f %f %f %f %f %s", &Points[0].x, &Points[0].y, &Points[0].z, &Points[1].x, &Points[1].y, &Points[1].z, &Points[2].x, &Points[2].y, &Points[2].z, &Angle1, &Angle2, FileName); + Points[0] = lcMul31(Points[0], CurrentTransform); + Points[1] = lcMul31(Points[1], CurrentTransform); + Points[2] = lcMul31(Points[2], CurrentTransform); + CleanTextureName(FileName); lcLibraryTextureMap& Map = TextureStack.Add();