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~230^2~285 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=76e2cc47045f535d5b71d1afa3ff4789f964ebd3;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 --- 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);