From: havoc Date: Tue, 28 Jun 2011 08:12:15 +0000 (+0000) Subject: fix offsetmapping without a q3 shader on Q1BSP and MDL X-Git-Tag: xonotic-v0.5.0~93 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7307693429905d86565b4a0ddcc4d0d04a6f0e51;p=xonotic%2Fdarkplaces.git fix offsetmapping without a q3 shader on Q1BSP and MDL git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11226 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=2bc57e09fc5ad356b342bb0dc466b5a761583802 --- diff --git a/model_alias.c b/model_alias.c index 3672dbc0..2231f3df 100644 --- a/model_alias.c +++ b/model_alias.c @@ -785,7 +785,7 @@ static void Mod_BuildAliasSkinFromSkinFrame(texture_t *texture, skinframe_t *ski if (texture->currentskinframe->hasalpha) texture->basematerialflags |= MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_NOSHADOW; texture->currentmaterialflags = texture->basematerialflags; - texture->offsetmapping = OFFSETMAPPING_OFF; + texture->offsetmapping = OFFSETMAPPING_DEFAULT; texture->offsetscale = 1; texture->specularscalemod = 1; texture->specularpowermod = 1; diff --git a/model_brush.c b/model_brush.c index c0e53d33..6a329ccd 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1659,7 +1659,7 @@ static void Mod_Q1BSP_LoadTextures(lump_t *l) tx->reflectfactor = 1; Vector4Set(tx->reflectcolor4f, 1, 1, 1, 1); tx->r_water_wateralpha = 1; - tx->offsetmapping = OFFSETMAPPING_OFF; + tx->offsetmapping = OFFSETMAPPING_DEFAULT; tx->offsetscale = 1; tx->specularscalemod = 1; tx->specularpowermod = 1; @@ -1788,6 +1788,8 @@ static void Mod_Q1BSP_LoadTextures(lump_t *l) skinframe = R_SkinFrame_LoadExternal(gamemode == GAME_TENEBRAE ? tx->name : va("textures/%s/%s", mapname, tx->name), TEXF_ALPHA | TEXF_MIPMAP | TEXF_ISWORLD | TEXF_PICMIP | TEXF_COMPRESS, false); if (!skinframe) skinframe = R_SkinFrame_LoadExternal(gamemode == GAME_TENEBRAE ? tx->name : va("textures/%s", tx->name), TEXF_ALPHA | TEXF_MIPMAP | TEXF_ISWORLD | TEXF_PICMIP | TEXF_COMPRESS, false); + if (skinframe) + tx->offsetmapping = OFFSETMAPPING_DEFAULT; // allow offsetmapping on external textures without a q3 shader if (!skinframe) { // did not find external texture, load it from the bsp or wad3