]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix loading of q1bsp sky replacement textures to also check
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 May 2010 21:06:21 +0000 (21:06 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 May 2010 21:06:21 +0000 (21:06 +0000)
textures/mapname/sky4 and such

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10193 d7cf8633-e32d-0410-b094-e92efae38249

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);