summaryrefslogtreecommitdiff
path: root/src/cgame/cg_ents.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_ents.c')
-rw-r--r--src/cgame/cg_ents.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index b56a1a40..682d8aad 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -549,9 +549,15 @@ static void CG_LightFlare( centity_t *cent )
float maxAngle;
vec3_t mins, maxs, start, end;
float srcRadius, srLocal, ratio = 1.0f;
+ int entityNum;
es = &cent->currentState;
+ if( cg.renderingThirdPerson )
+ entityNum = MAGIC_TRACE_HACK;
+ else
+ entityNum = cg.predictedPlayerState.clientNum;
+
//don't draw light flares
if( cg_lightFlare.integer == FLARE_OFF )
return;
@@ -561,7 +567,7 @@ static void CG_LightFlare( centity_t *cent )
return;
CG_Trace( &tr, cg.refdef.vieworg, NULL, NULL, es->angles2,
- cg.predictedPlayerState.clientNum, MASK_SHOT );
+ entityNum, MASK_SHOT );
//if there is no los between the view and the flare source
//it definately cannot be seen
@@ -636,7 +642,7 @@ static void CG_LightFlare( centity_t *cent )
srLocal += RADIUSSTEP;
SETBOUNDS( mins, maxs, srLocal );
CG_Trace( &tr, start, mins, maxs, end,
- cg.predictedPlayerState.clientNum, MASK_SHOT );
+ entityNum, MASK_SHOT );
} while( ( tr.fraction == 1.0f && !tr.startsolid ) && ( srLocal < srcRadius ) );
@@ -647,7 +653,7 @@ static void CG_LightFlare( centity_t *cent )
{
SETBOUNDS( mins, maxs, srLocal );
CG_Trace( &tr, start, mins, maxs, end,
- cg.predictedPlayerState.clientNum, MASK_SHOT );
+ entityNum, MASK_SHOT );
srLocal -= RADIUSSTEP;
} while( ( tr.fraction < 1.0f || tr.startsolid ) && ( srLocal > 0.0f ) );
@@ -661,7 +667,7 @@ static void CG_LightFlare( centity_t *cent )
//draw timed flares
SETBOUNDS( mins, maxs, srcRadius );
CG_Trace( &tr, start, mins, maxs, end,
- cg.predictedPlayerState.clientNum, MASK_SHOT );
+ entityNum, MASK_SHOT );
if( ( tr.fraction < 1.0f || tr.startsolid ) && cent->lfs.status )
{
@@ -698,7 +704,7 @@ static void CG_LightFlare( centity_t *cent )
//draw nofade flares
SETBOUNDS( mins, maxs, srcRadius );
CG_Trace( &tr, start, mins, maxs, end,
- cg.predictedPlayerState.clientNum, MASK_SHOT );
+ entityNum, MASK_SHOT );
//flare source occluded
if( ( tr.fraction < 1.0f || tr.startsolid ) )