X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=misc%2Fsource%2Fnetradiant-src%2Ftools%2Fquake3%2Fq3map2%2Fsurface.c;h=b5dd724e15d9ee564b548f465129ec8d80108ff3;hb=aca16977f4adf9c8fdff0e3256536d7f6064346d;hp=ca4f5fa6ebd28138f4978040c365524d4d7d292a;hpb=150cca22c3b5cf31649bbc59a0114d2c212ecf15;p=voretournament%2Fvoretournament.git diff --git a/misc/source/netradiant-src/tools/quake3/q3map2/surface.c b/misc/source/netradiant-src/tools/quake3/q3map2/surface.c index ca4f5fa6..b5dd724e 100644 --- a/misc/source/netradiant-src/tools/quake3/q3map2/surface.c +++ b/misc/source/netradiant-src/tools/quake3/q3map2/surface.c @@ -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 */