diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_cmds.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index c6052eb4..175bd8b2 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1093,14 +1093,17 @@ void Cmd_CallVote_f( gentity_t *ent ) vote[ MAX_TOKEN_CHARS ], arg[ MAX_TOKEN_CHARS ]; char name[ MAX_NAME_LENGTH ] = ""; - char *reason; + char caller[ MAX_NAME_LENGTH ] = ""; + char reason[ MAX_TOKEN_CHARS ]; + char *creason; int clientNum = -1; team_t team; trap_Argv( 0, cmd, sizeof( cmd ) ); trap_Argv( 1, vote, sizeof( vote ) ); trap_Argv( 2, arg, sizeof( arg ) ); - reason = ConcatArgs( 3 ); + creason = ConcatArgs( 3 ); + G_DecolorString( creason, reason, sizeof( reason ) ); if( !Q_stricmp( cmd, "callteamvote" ) ) team = ent->client->pers.teamSelection; @@ -1416,13 +1419,15 @@ void Cmd_CallVote_f( gentity_t *ent ) level.voteDisplayString[ team ] ) ); } + G_DecolorString( ent->client->pers.netname, caller, sizeof( caller ) ); + level.voteTime[ team ] = level.time; trap_SetConfigstring( CS_VOTE_TIME + team, va( "%d", level.voteTime[ team ] ) ); trap_SetConfigstring( CS_VOTE_STRING + team, level.voteDisplayString[ team ] ); trap_SetConfigstring( CS_VOTE_CALLER + team, - ent->client->pers.netname ); + caller ); ent->client->pers.namelog->voteCount++; ent->client->pers.vote |= 1 << team; |