diff --git a/code/MDLFileData.h b/code/MDLFileData.h index b9b28af7d..fd7754e0a 100644 --- a/code/MDLFileData.h +++ b/code/MDLFileData.h @@ -846,7 +846,7 @@ struct IntGroupInfo_MDL7 BE_NCONST MDL::TexCoord_MDL7* pcGroupUVs; //! Points to the beginning of the triangle section - BE_NCONST MDL::Triangle_MDL7* pcGroupTris; + MDL::Triangle_MDL7* pcGroupTris; //! Points to the beginning of the vertex section BE_NCONST MDL::Vertex_MDL7* pcGroupVerts; diff --git a/code/MDLLoader.cpp b/code/MDLLoader.cpp index 672d88bea..4b46329be 100644 --- a/code/MDLLoader.cpp +++ b/code/MDLLoader.cpp @@ -191,7 +191,7 @@ void MDLImporter::InternReadFile( const std::string& pFile, iGSFileVersion = 7; InternReadFile_3DGS_MDL7(); } - // IDST/IDSQ Format (CS:S/HLČ, etc ...) + // IDST/IDSQ Format (CS:S/HL^2, etc ...) else if (AI_MDL_MAGIC_NUMBER_BE_HL2a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2a == iMagicWord || AI_MDL_MAGIC_NUMBER_BE_HL2b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2b == iMagicWord) { @@ -970,7 +970,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo, MDL::IntGroupData_MDL7& groupData) { const MDL::Header_MDL7 *pcHeader = (const MDL::Header_MDL7*)this->mBuffer; - BE_NCONST MDL::Triangle_MDL7* pcGroupTris = groupInfo.pcGroupTris; + MDL::Triangle_MDL7* pcGroupTris = groupInfo.pcGroupTris; // iterate through all triangles and build valid display lists unsigned int iOutIndex = 0; @@ -986,7 +986,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo, unsigned int iIndex = pcGroupTris->v_index[c]; if(iIndex > (unsigned int)groupInfo.pcGroup->numverts) { // (we might need to read this section a second time - to process frame vertices correctly) - const_cast(pcGroupTris)->v_index[c] = iIndex = groupInfo.pcGroup->numverts-1; + pcGroupTris->v_index[c] = iIndex = groupInfo.pcGroup->numverts-1; DefaultLogger::get()->warn("Index overflow in MDL7 vertex list"); } @@ -1083,7 +1083,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo, } } // get the next triangle in the list - pcGroupTris = (BE_NCONST MDL::Triangle_MDL7*)((const char*)pcGroupTris + pcHeader->triangle_stc_size); + pcGroupTris = (MDL::Triangle_MDL7*)((const char*)pcGroupTris + pcHeader->triangle_stc_size); } } @@ -1422,7 +1422,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( ) szCurrent += pcHeader->skinpoint_stc_size * groupInfo.pcGroup->num_stpts; // now get a pointer to all triangle in the group - groupInfo.pcGroupTris = (BE_NCONST MDL::Triangle_MDL7*)szCurrent; + groupInfo.pcGroupTris = (Triangle_MDL7*)szCurrent; szCurrent += pcHeader->triangle_stc_size * groupInfo.pcGroup->numtris; // now get a pointer to all vertices in the group