]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
fix loading of q1bsp sky replacement textures to also check
[xonotic/darkplaces.git] / model_brush.c
index 9a776cbd71b602f29b92ce5db351237c304dffda..2b22592ae11302f5490f9765eb3f4fe584082f56 100644 (file)
@@ -1578,7 +1578,9 @@ static void Mod_Q1BSP_LoadTextures(lump_t *l)
                        // LordHavoc: HL sky textures are entirely different than quake
                        if (!loadmodel->brush.ishlbsp && !strncmp(tx->name, "sky", 3) && mtwidth == mtheight * 2)
                        {
-                               data = loadimagepixelsbgra(tx->name, false, false, r_texture_convertsRGB_skin.integer);
+                               data = loadimagepixelsbgra(gamemode == GAME_TENEBRAE ? tx->name : va("textures/%s/%s", mapname, tx->name), false, false, r_texture_convertsRGB_skin.integer);
+                               if (!data)
+                                       data = loadimagepixelsbgra(gamemode == GAME_TENEBRAE ? tx->name : va("textures/%s", tx->name), false, false, r_texture_convertsRGB_skin.integer);
                                if (data && image_width == image_height * 2)
                                {
                                        R_Q1BSP_LoadSplitSky(data, image_width, image_height, 4);