From ed215fc83af4fd3bee50a3fe5b4f252ee02284bb Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Sun, 28 Nov 2010 22:21:16 +0000 Subject: * (bug 4760) Display Vote Caller (thanks Brian Teapot Shannon, msk, benmachine) --- src/cgame/cg_draw.c | 5 +++-- src/cgame/cg_local.h | 1 + src/cgame/cg_servercmds.c | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 96319e94..848b20d3 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -3080,8 +3080,9 @@ static void CG_DrawVote( team_t team ) Q_strncpyz( nokey, CG_KeyBinding( va( "%svote no", team == TEAM_NONE ? "" : "team" ) ), sizeof( nokey ) ); - s = va( "%sVOTE(%i): \"%s\" [%s]Yes:%i [%s]No:%i", - team == TEAM_NONE ? "" : "TEAM", sec, cgs.voteString[ team ], + s = va( "%sVOTE(%i): \"%s\" called by \"%s" S_COLOR_WHITE "\" [%s]Yes:%i [%s]No:%i", + team == TEAM_NONE ? "" : "TEAM", sec, + cgs.voteString[ team ], cgs.voteCaller[ team ], yeskey, cgs.voteYes[ team ], nokey, cgs.voteNo[ team ] ); UI_Text_Paint( 8, team == TEAM_NONE ? 340 : 360, 0.3f, white, s, 0, 0, ITEM_TEXTSTYLE_NORMAL ); diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 266d0c8b..6bc011f7 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1351,6 +1351,7 @@ typedef struct int voteTime[ NUM_TEAMS ]; int voteYes[ NUM_TEAMS ]; int voteNo[ NUM_TEAMS ]; + char voteCaller[ NUM_TEAMS ][ MAX_NAME_LENGTH ]; qboolean voteModified[ NUM_TEAMS ];// beep whenever changed char voteString[ NUM_TEAMS ][ MAX_STRING_TOKENS ]; diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index db1b2262..b5a85a5b 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -342,6 +342,9 @@ static void CG_ConfigStringModified( void ) else if( num >= CS_VOTE_STRING && num < CS_VOTE_STRING + NUM_TEAMS ) Q_strncpyz( cgs.voteString[ num - CS_VOTE_STRING ], str, sizeof( cgs.voteString[ num - CS_VOTE_STRING ] ) ); + else if( num >= CS_VOTE_CALLER && num < CS_VOTE_CALLER + NUM_TEAMS ) + Q_strncpyz( cgs.voteCaller[ num - CS_VOTE_CALLER ], str, + sizeof( cgs.voteCaller[ num - CS_VOTE_CALLER ] ) ); else if( num == CS_INTERMISSION ) cg.intermissionStarted = atoi( str ); else if( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) -- cgit