]> icculus.org git repositories - divverent/nexuiz.git/blob - misc/gtkradiant/singlepatches-radiant15/q3map2-UTavgcolorfix.diff
fix patches for ZeroRadiant
[divverent/nexuiz.git] / misc / gtkradiant / singlepatches-radiant15 / q3map2-UTavgcolorfix.diff
1 Index: tools/quake3/q3map2/shaders.c
2 ===================================================================
3 --- tools/quake3/q3map2/shaders.c       (revision 191)
4 +++ tools/quake3/q3map2/shaders.c       (working copy)
5 @@ -793,8 +793,14 @@
6         }
7         
8         if( VectorLength( si->color ) <= 0.0f )
9 +       {
10                 ColorNormalize( color, si->color );
11 -       VectorScale( color, (1.0f / count), si->averageColor );
12 +               VectorScale( color, (1.0f / count), si->averageColor );
13 +       }
14 +       else
15 +       {
16 +               VectorCopy( si->color, si->averageColor );
17 +       }
18  }
19  
20