]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix offsetmapping without a q3 shader on Q1BSP and MDL
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 28 Jun 2011 08:12:15 +0000 (08:12 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 30 Jun 2011 05:06:53 +0000 (07:06 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11226 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2bc57e09fc5ad356b342bb0dc466b5a761583802

model_alias.c
model_brush.c

index 3672dbc09378607043a9164cd5100b4e00532c5f..2231f3df546326c1b65a01d40818ff15260b05c5 100644 (file)
@@ -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;
index c0e53d339ed6a42dd8e257d2ee2c1ab458416668..6a329ccd513c400f3c67bb0e1bd5b0f28cc1b6cc 100644 (file)
@@ -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