]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Convert \ to / when loading texture from Q3 shader
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 2 Jul 2020 22:15:03 +0000 (22:15 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 2 Jul 2020 22:15:03 +0000 (22:15 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12779 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index 3121250f1cafb1dab8347f65bb4dcdfc20e896b1..94da0da8f2659763916399eed581ff2ea52fa2d7 100644 (file)
@@ -2228,7 +2228,12 @@ texture_shaderpass_t *Mod_CreateShaderPassFromQ3ShaderLayer(mempool_t *mempool,
        for (j = 0; j < Q3MAXTCMODS && layer->tcmods[j].tcmod != Q3TCMOD_NONE; j++)
                shaderpass->tcmods[j] = layer->tcmods[j];
        for (j = 0; j < layer->numframes; j++)
+       {
+               for (int i = 0; layer->texturename[j][i]; i++)
+                       if(layer->texturename[j][i] == '\\')
+                               layer->texturename[j][i] = '/';
                shaderpass->skinframes[j] = R_SkinFrame_LoadExternal(layer->texturename[j], texflags, false, true);
+       }
        return shaderpass;
 }