From 76e2cc47045f535d5b71d1afa3ff4789f964ebd3 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 11 May 2010 21:06:21 +0000 Subject: [PATCH] fix loading of q1bsp sky replacement textures to also check textures/mapname/sky4 and such git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10193 d7cf8633-e32d-0410-b094-e92efae38249 --- model_brush.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/model_brush.c b/model_brush.c index 9a776cbd..2b22592a 100644 --- a/model_brush.c +++ b/model_brush.c @@ -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); -- 2.39.2