From 43658d6a8d770c17c36be31b3f205d4e20fc5401 Mon Sep 17 00:00:00 2001 From: Bryce Hutchings Date: Tue, 27 Aug 2002 07:02:09 +0000 Subject: [PATCH] terrain fix? --- reaction/cgame/cg_players.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reaction/cgame/cg_players.c b/reaction/cgame/cg_players.c index 220d6f57..7e5da034 100644 --- a/reaction/cgame/cg_players.c +++ b/reaction/cgame/cg_players.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.49 2002/08/27 07:02:09 niceass +// terrain fix? +// // Revision 1.48 2002/08/27 06:57:24 niceass // gooddamnit =( // @@ -2494,7 +2497,9 @@ qboolean CG_CheckPlayerVisible(vec3_t start, centity_t *cent) { CG_Trace(&trace, start, NULL, NULL, ends[i], -1, CONTENTS_SOLID); if ( trace.fraction == 1 || (trace.contents & ( CONTENTS_TRANSLUCENT | CONTENTS_DETAIL ) ) || (trace.surfaceFlags & ( SURF_NODRAW | SURF_GLASS ) ) ) - return qtrue; + // Terrain has all 3 of these set. Assume it's terrain if all 3 are this way + if ( !(trace.surfaceFlags & (SURF_NOLIGHTMAP & SURF_NOMARKS & SURF_NODRAW)) ) + return qtrue; } return qfalse;