Tiny order tweak.

This commit is contained in:
Par Winzell 2019-01-24 17:03:24 -08:00
parent 12025de179
commit a3bee2e42a
1 changed files with 3 additions and 2 deletions

View File

@ -101,8 +101,9 @@ int RawModel::AddTexture(
} }
for (size_t i = 0; i < textures.size(); i++) { for (size_t i = 0; i < textures.size(); i++) {
// we allocate the struct even if the implementing image file is missing // we allocate the struct even if the implementing image file is missing
if (StringUtils::CompareNoCase(textures[i].fileLocation, fileLocation) == 0 && if (textures[i].usage == usage &&
StringUtils::CompareNoCase(textures[i].name, name) == 0 && textures[i].usage == usage) { StringUtils::CompareNoCase(textures[i].fileLocation, fileLocation) == 0 &&
StringUtils::CompareNoCase(textures[i].name, name) == 0) {
return (int)i; return (int)i;
} }
} }