From 42c1c733b93b0807362ba34eedd12c28f6333d95 Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Fri, 1 Dec 2017 15:20:50 +0100 Subject: [PATCH] Update MD3Loader.cpp --- code/MD3Loader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/MD3Loader.cpp b/code/MD3Loader.cpp index f6a3a85dd..11a6e56dd 100644 --- a/code/MD3Loader.cpp +++ b/code/MD3Loader.cpp @@ -1018,11 +1018,11 @@ void MD3Importer::InternReadFile( const std::string& pFile, // Convert the normal vector to uncompressed float3 format aiVector3D& nor = pcMesh->mNormals[iCurrent]; - LatLngNormalToVec3(pcVertices[pcTriangles->INDEXES[c]].NORMAL,(ai_real*)&nor); + LatLngNormalToVec3(pcVertices[index].NORMAL,(ai_real*)&nor); // Read texture coordinates - pcMesh->mTextureCoords[0][iCurrent].x = pcUVs[ pcTriangles->INDEXES[c]].U; - pcMesh->mTextureCoords[0][iCurrent].y = 1.0f-pcUVs[ pcTriangles->INDEXES[c]].V; + pcMesh->mTextureCoords[0][iCurrent].x = pcUVs[index].U; + pcMesh->mTextureCoords[0][iCurrent].y = 1.0f-pcUVs[index].V; } // Flip face order if necessary if (!shader || shader->cull == Q3Shader::CULL_CW) {