From: havoc Date: Tue, 11 May 2010 21:06:21 +0000 (+0000) Subject: fix loading of q1bsp sky replacement textures to also check X-Git-Tag: xonotic-v0.1.0preview~463 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=49e05b1fb956243febc3b70a19cea3a6f324582a;p=xonotic%2Fdarkplaces.git 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 ::stable-branch::merge=76e2cc47045f535d5b71d1afa3ff4789f964ebd3 --- 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);