mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-23 12:42:36 +00:00
RDF_NOFOG flag.
This commit is contained in:
parent
00b269f3a7
commit
5a42fdd5cf
2 changed files with 5 additions and 2 deletions
|
@ -99,13 +99,15 @@ void R_AddPolygonSurfaces( void ) {
|
|||
int i;
|
||||
shader_t *sh;
|
||||
srfPoly_t *poly;
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,7 +168,7 @@ void RE_AddPolyToScene( qhandle_t hShader, int numVerts, const polyVert_t *verts
|
|||
fogIndex = 0;
|
||||
}
|
||||
// see if it is in a fog volume
|
||||
else if ( tr.world->numfogs == 1 ) {
|
||||
else if ( tr.world->numfogs == 1) {
|
||||
fogIndex = 0;
|
||||
} else {
|
||||
// find which fog volume the poly is in
|
||||
|
|
|
@ -51,6 +51,7 @@ 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
|
||||
#define RDF_NOFOG 0x0008 // don't apply fog
|
||||
|
||||
typedef struct {
|
||||
vec3_t xyz;
|
||||
|
|
Loading…
Reference in a new issue