This is not equivalent to at all to classic DarkPlaces and the result is that all replacement textures and shaders in Q1 bsp will have the wrong texture matrix because the external texture size is used.
tx = loadmodel->data_textures + i;
// try to load shader or external textures, but first we have to backup the texture_t because shader loading overwrites it even if it fails
backuptex = loadmodel->data_textures[i];
if (name[0] && /* HACK */ strncmp(name, "sky", 3) /* END HACK */ && (Mod_LoadTextureFromQ3Shader(loadmodel->mempool, loadmodel->name, loadmodel->data_textures + i, va(vabuf, sizeof(vabuf), "%s/%s", mapname, name), false, false, TEXF_ALPHA | TEXF_MIPMAP | TEXF_ISWORLD | TEXF_PICMIP | TEXF_COMPRESS, MATERIALFLAG_WALL) ||
Mod_LoadTextureFromQ3Shader(loadmodel->mempool, loadmodel->name, loadmodel->data_textures + i, va(vabuf, sizeof(vabuf), "%s" , name), false, false, TEXF_ALPHA | TEXF_MIPMAP | TEXF_ISWORLD | TEXF_PICMIP | TEXF_COMPRESS, MATERIALFLAG_WALL)))
{
// set the width/height fields which are used for parsing texcoords in this bsp format
tx->width = mtwidth;
tx->height = mtheight;
continue;
}
// no luck with loading shaders or external textures - restore the in-progress texture loading
loadmodel->data_textures[i] = backuptex;
It is actually worse than that, it doesn't honor map folder like "textures/e1m1/this_texture.tga" won't ever get used.
What I did in Zircon was to rewrite and rework the texture load using DarkPlaces Classic for the sequence of event while keeping the intentions of what DarkPlaces Beta was trying to improve.
This water in Quake Combat+ is wrong:
In model_brush.c in Mod_Q1BSP_LoadTextures
This is not equivalent to at all to classic DarkPlaces and the result is that all replacement textures and shaders in Q1 bsp will have the wrong texture matrix because the external texture size is used.
It is actually worse than that, it doesn't honor map folder like "textures/e1m1/this_texture.tga" won't ever get used.
What I did in Zircon was to rewrite and rework the texture load using DarkPlaces Classic for the sequence of event while keeping the intentions of what DarkPlaces Beta was trying to improve.
This is what the water is supposed to look like.