corrected bug in appending models with textures

fl.ImportData(*fi)  should happen BEFORE doing the textureOffset
correction
This commit is contained in:
Marco Callieri 2017-04-21 15:17:00 +02:00
parent 066762521a
commit ffd8d320e2
1 changed files with 1 additions and 1 deletions

View File

@ -311,10 +311,10 @@ static void Mesh(MeshLeft& ml, ConstMeshRight& mr, const bool selected = false,
for(int i = 0; i < fl.VN(); ++i)
fl.V(i) = &ml.vert[remap.vert[Index(mr,fi->cV(i))]];
}
fl.ImportData(*fi);
if(WTFlag)
for(int i = 0; i < fl.VN(); ++i)
fl.WT(i).n() += short(textureOffset);
fl.ImportData(*fi);
if(adjFlag) ImportFaceAdj(ml,mr,ml.face[remap.face[Index(mr,*fi)]],*fi,remap);
}