From: havoc Date: Tue, 20 Feb 2007 00:25:57 +0000 (+0000) Subject: added parsing of surfaceparm antiportal X-Git-Tag: xonotic-v0.1.0preview~3543 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3a1e31d2cbf35505278d48bc9bf9d5e3902fd3b7;p=xonotic%2Fdarkplaces.git added parsing of surfaceparm antiportal added support of "noshader" (treated the same as nodraw, basically) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6873 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_brush.c b/model_brush.c index d7fef5d5..673cfff9 100644 --- a/model_brush.c +++ b/model_brush.c @@ -4261,8 +4261,10 @@ static void Mod_Q3BSP_LoadShaders(void) shader->surfaceparms |= Q3SURFACEPARM_WATER; else if (!strcasecmp(parameter[1], "pointlight")) shader->surfaceparms |= Q3SURFACEPARM_POINTLIGHT; + else if (!strcasecmp(parameter[1], "antiportal")) + shader->surfaceparms |= Q3SURFACEPARM_ANTIPORTAL; else - Con_Printf("%s parsing warning: unknown surfaceparm \"%s\"\n", search->filenames[fileindex], parameter[1]); + Con_DPrintf("%s parsing warning: unknown surfaceparm \"%s\"\n", search->filenames[fileindex], parameter[1]); } else if (!strcasecmp(parameter[0], "sky") && numparameters >= 2) { @@ -4436,6 +4438,8 @@ Q3 shader blendfuncs actually used in the game (* = supported by DP) Con_Printf("%s: could not load texture \"%s\" (frame %i) for shader \"%s\"\n", loadmodel->name, shader->backgroundlayer->texturename[j], j, out->name); } } + else if (!strcmp(out->name, "noshader")) + out->surfaceparms = 0; else { c++; diff --git a/model_brush.h b/model_brush.h index 1b5b1950..6a48ef59 100644 --- a/model_brush.h +++ b/model_brush.h @@ -638,6 +638,7 @@ q3dpvs_t; #define Q3SURFACEPARM_DUST 268435456 #define Q3SURFACEPARM_BOTCLIP 536870912 #define Q3SURFACEPARM_LIGHTGRID 1073741824 +#define Q3SURFACEPARM_ANTIPORTAL 2147483648 // various flags from shaders, used for special effects not otherwise classified #define Q3TEXTUREFLAG_TWOSIDED 1