From: Rudolf Polzer Date: Sun, 5 Jun 2011 17:32:43 +0000 (+0200) Subject: fix ignoring surface alpha for surfacemodels X-Git-Tag: xonotic-v0.5.0~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=770b8ea4015c56d7f5098933a71806e8eb01a3f4;p=xonotic%2Fnetradiant.git fix ignoring surface alpha for surfacemodels --- diff --git a/tools/quake3/q3map2/surface.c b/tools/quake3/q3map2/surface.c index ca4f5fa6..ba400b08 100644 --- a/tools/quake3/q3map2/surface.c +++ b/tools/quake3/q3map2/surface.c @@ -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 */