]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/netradiant-src/tools/quake3/q3map2/surface.c
Latest fteqcc and netradiant sources
[voretournament/voretournament.git] / misc / source / netradiant-src / tools / quake3 / q3map2 / surface.c
index ca4f5fa6ebd28138f4978040c365524d4d7d292a..b5dd724e15d9ee564b548f465129ec8d80108ff3 100644 (file)
@@ -2147,7 +2147,7 @@ subdivides a patch into an approximate curve and filters it into the tree
 
 static int FilterPatchIntoTree( mapDrawSurface_t *ds, tree_t *tree )
 {
-       int                                     x, y, refs;
+       int                                     x, y, refs = 0;
        
        for(y = 0; y + 2 < ds->patchHeight; y += 2)
                for(x = 0; x + 2 < ds->patchWidth; x += 2)
@@ -3108,7 +3108,7 @@ int AddSurfaceModelsToTriangle_r( mapDrawSurface_t *ds, surfaceModel_t *model, b
                        /* roll the dice (model's odds scaled by vertex alpha) */
                        odds = model->odds * (tri[ 0 ]->color[ 0 ][ 3 ] + tri[ 0 ]->color[ 0 ][ 3 ] + tri[ 0 ]->color[ 0 ][ 3 ]) / 765.0f;
                        r = Random();
-                       if( r > model->odds )
+                       if( r > odds )
                                return 0;
                        
                        /* calculate scale */