diff options
author | Michael Levin <risujin@fastmail.fm> | 2009-10-03 11:32:06 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:06 +0000 |
commit | 03d3044a87e83a85a7365e77affc68986f093f22 (patch) | |
tree | 95c20abfc9d65287bc5b694aa02f4904d65d37a7 | |
parent | 1da436e9f6b256be79bacccf6ede805e51aff65d (diff) |
Fixed a bug that kept squad markers from working.
-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; |