diff --git a/reaction/code/renderer/tr_scene.c b/reaction/code/renderer/tr_scene.c index e7db461c..3b79d8a4 100644 --- a/reaction/code/renderer/tr_scene.c +++ b/reaction/code/renderer/tr_scene.c @@ -99,13 +99,16 @@ void R_AddPolygonSurfaces( void ) { int i; shader_t *sh; srfPoly_t *poly; +// JBravo: Fog fixes + int fogMask; tr.currentEntityNum = ENTITYNUM_WORLD; tr.shiftedEntityNum = tr.currentEntityNum << QSORT_ENTITYNUM_SHIFT; + fogMask = -((tr.refdef.rdflags & RDF_NOFOG) == 0); for ( i = 0, poly = tr.refdef.polys; i < tr.refdef.numPolys ; i++, poly++ ) { sh = R_GetShaderByHandle( poly->hShader ); - R_AddDrawSurf( ( void * )poly, sh, poly->fogIndex, qfalse ); + R_AddDrawSurf( ( void * )poly, sh, poly->fogIndex & fogMask, qfalse ); } } diff --git a/reaction/code/renderer/tr_types.h b/reaction/code/renderer/tr_types.h index 50f9759a..4dfccb0e 100644 --- a/reaction/code/renderer/tr_types.h +++ b/reaction/code/renderer/tr_types.h @@ -51,6 +51,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // refdef flags #define RDF_NOWORLDMODEL 0x0001 // used for player configuration screen #define RDF_HYPERSPACE 0x0004 // teleportation effect +// JBravo: Fox fixes +#define RDF_NOFOG 0x0008 // don't apply fog typedef struct { vec3_t xyz;