q3 shader parsing now sets more materialflags (such as transparency)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 17 Mar 2005 10:17:07 +0000 (10:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 17 Mar 2005 10:17:07 +0000 (10:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5091 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index bd238e4..087430c 100644 (file)
@@ -3811,12 +3811,18 @@ static void Mod_Q3BSP_LoadTextures(lump_t *l)
                                                                        out->basematerialflags |= MATERIALFLAG_NODRAW;
                                                                else if (out->surfaceparms & Q3SURFACEPARM_SKY)
                                                                        out->basematerialflags |= MATERIALFLAG_SKY;
                                                                        out->basematerialflags |= MATERIALFLAG_NODRAW;
                                                                else if (out->surfaceparms & Q3SURFACEPARM_SKY)
                                                                        out->basematerialflags |= MATERIALFLAG_SKY;
-                                                               else if (out->surfaceparms & (Q3SURFACEPARM_WATER | Q3SURFACEPARM_SLIME | Q3SURFACEPARM_LAVA))
-                                                                       out->basematerialflags |= MATERIALFLAG_WATER;
+                                                               else if (out->surfaceparms & Q3SURFACEPARM_LAVA)
+                                                                       out->basematerialflags |= MATERIALFLAG_WATER | MATERIALFLAG_FULLBRIGHT;
+                                                               else if (out->surfaceparms & Q3SURFACEPARM_SLIME)
+                                                                       out->basematerialflags |= MATERIALFLAG_WATER | MATERIALFLAG_WATERALPHA;
+                                                               else if (out->surfaceparms & Q3SURFACEPARM_WATER)
+                                                                       out->basematerialflags |= MATERIALFLAG_WATER | MATERIALFLAG_WATERALPHA;
                                                                else
                                                                        out->basematerialflags |= MATERIALFLAG_WALL;
                                                                else
                                                                        out->basematerialflags |= MATERIALFLAG_WALL;
-                                                               if (out->surfaceparms & (Q3SURFACEPARM_SLIME | Q3SURFACEPARM_WATER))
-                                                                       out->basematerialflags |= MATERIALFLAG_WATERALPHA;
+                                                               if (out->surfaceparms & Q3SURFACEPARM_TRANS)
+                                                                       out->basematerialflags |= MATERIALFLAG_TRANSPARENT;
+                                                               if (out->textureflags & Q3TEXTUREFLAG_ADDITIVE)
+                                                                       out->basematerialflags |= MATERIALFLAG_ADD | MATERIALFLAG_TRANSPARENT;
                                                                strlcpy(out->firstpasstexturename, firstpasstexturename, sizeof(out->firstpasstexturename));
                                                                if ((flags & Q3SURFACEPARM_SKY) && sky[0])
                                                                {
                                                                strlcpy(out->firstpasstexturename, firstpasstexturename, sizeof(out->firstpasstexturename));
                                                                if ((flags & Q3SURFACEPARM_SKY) && sky[0])
                                                                {