From 3fb59eda688a97e6ddd819e67ca0b37a2095b61c Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Thu, 2 Jul 2020 22:15:03 +0000 Subject: [PATCH] Convert \ to / when loading texture from Q3 shader git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12779 d7cf8633-e32d-0410-b094-e92efae38249 --- model_shared.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model_shared.c b/model_shared.c index 3121250f..94da0da8 100644 --- a/model_shared.c +++ b/model_shared.c @@ -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; } -- 2.39.2