diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_consolecmds.c | 11 | ||||
-rw-r--r-- | src/cgame/cg_draw.c | 3 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c index d28c4211..b8b055b9 100644 --- a/src/cgame/cg_consolecmds.c +++ b/src/cgame/cg_consolecmds.c @@ -193,12 +193,11 @@ static void CG_SquadMark_f( void ) centity_t *cent; vec3_t start, end; trace_t trace; - + // Find the player we are looking at - VectorCopy( cg.refdef.vieworg, start ); - VectorMA( start, 131072, cg.refdef.viewaxis[ 0 ], end ); - CG_Trace( &trace, start, vec3_origin, vec3_origin, end, - cg.snap->ps.clientNum, CONTENTS_SOLID|CONTENTS_BODY ); + VectorMA( cg.refdef.vieworg, 4096, cg.refdef.viewaxis[ 0 ], end ); + CG_Trace( &trace, cg.refdef.vieworg, NULL, NULL, end, + cg.snap->ps.clientNum, CONTENTS_SOLID | CONTENTS_BODY ); if( trace.entityNum >= MAX_CLIENTS ) return; @@ -208,7 +207,7 @@ static void CG_SquadMark_f( void ) cgs.clientinfo[ trace.entityNum ].team != cg.snap->ps.stats[ STAT_PTEAM ] ) return; - + cent->pe.squadMarked = !cent->pe.squadMarked; } diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 31e619c7..051a091b 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2288,7 +2288,8 @@ static void CG_DrawSquadMarkers( vec4_t color ) { cent = cg_entities + cg.snap->entities[ i ].number; if( cent->currentState.eType != ET_PLAYER || - cgs.clientinfo[ i ].team != cg.snap->ps.stats[ STAT_PTEAM ] || + cgs.clientinfo[ cg.snap->entities[ i ].number ].team != + cg.snap->ps.stats[ STAT_PTEAM ] || !cent->pe.squadMarked ) continue; |