From 1bb00ed4f01102b08d4d1685e092b6801788e4ff Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Wed, 16 May 2018 21:42:39 +0200 Subject: [PATCH] Fix for Unreal meshes that don't have sequential texture numbers --- src/r_data/models/models_ue1.cpp | 11 ++++++++--- src/r_data/models/models_ue1.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/r_data/models/models_ue1.cpp b/src/r_data/models/models_ue1.cpp index 250ca5802..b05aff707 100644 --- a/src/r_data/models/models_ue1.cpp +++ b/src/r_data/models/models_ue1.cpp @@ -75,11 +75,16 @@ bool FUE1Model::Load( const char *filename, int lumpnum, const char *buffer, int numFrames = ahead->numframes; numPolys = dhead->numpolys; numGroups = 0; + groupIndices.Reset(); uint8_t used[256] = {0}; for ( int i=0; isurfaceskinIDs[curMDLIndex][i]); if ( !sskin ) { - continue; vofs += vsize; + continue; } } renderer->SetMaterial(sskin,false,translation); diff --git a/src/r_data/models/models_ue1.h b/src/r_data/models/models_ue1.h index 9637ea99d..91d568047 100644 --- a/src/r_data/models/models_ue1.h +++ b/src/r_data/models/models_ue1.h @@ -88,4 +88,5 @@ private: TArray verts; TArray polys; TArray groups; + TArray groupIndices; };