Changeset 223
- Timestamp:
- 03/16/08 15:39:33 (5 months ago)
- Files:
-
- GtkRadiant/branches/ZeroRadiant/radiant/brush.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/branches/ZeroRadiant/radiant/brush.cpp
r197 r223 2890 2890 } 2891 2891 2892 #define Q2_SURF_TRANS33 0x00000010 2893 #define Q2_SURF_TRANS66 0x00000020 2894 2892 2895 void Brush_Draw(brush_t *b) 2893 2896 { … … 2908 2911 // guarantee the texture will be set first 2909 2912 bool bTrans; 2913 float transVal; 2910 2914 prev = NULL; 2911 2915 for (face = b->brush_faces,order = 0 ; face ; face=face->next, order++) … … 2917 2921 } 2918 2922 2919 bTrans = (face->pShader->getFlags() & QER_TRANS); 2923 bTrans = (face->pShader->getFlags() & QER_TRANS); 2924 transVal = face->pShader->getTrans(); 2925 // try to read the texture def surface flags to get trans 2926 if (!bTrans) { 2927 if (face->texdef.flags & Q2_SURF_TRANS33) { 2928 bTrans = true; 2929 transVal = 0.33; 2930 } else if (face->texdef.flags & Q2_SURF_TRANS66) { 2931 bTrans = true; 2932 transVal = 0.66; 2933 } 2934 } 2920 2935 2921 2936 if (bTrans && !(nGLState & DRAW_GL_BLEND)) … … 2961 2976 { 2962 2977 if (!b->owner->eclass->fixedsize) 2963 material[3] = face->pShader->getTrans();2978 material[3] = transVal; 2964 2979 else 2965 2980 material[3] = 1; … … 2975 2990 pShader = face->pShader; 2976 2991 VectorCopy(pShader->getTexture()->color, material); 2977 material[3] = identity[3] = pShader->getTrans();2992 material[3] = identity[3] = transVal; 2978 2993 2979 2994 if (nGLState & DRAW_GL_TEXTURE_2D)
