added parsing of surfaceparm antiportal
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 20 Feb 2007 00:25:57 +0000 (00:25 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 20 Feb 2007 00:25:57 +0000 (00:25 +0000)
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

model_brush.c
model_brush.h

index d7fef5d..673cfff 100644 (file)
@@ -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++;
index 1b5b195..6a48ef5 100644 (file)
@@ -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