summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkai <kai@zittrig.eu>2020-04-27 19:58:43 +0100
committerkai <kai@zittrig.eu>2020-04-27 19:58:43 +0100
commit45725bd88afe805abec87ef1085105b727e18ff6 (patch)
tree8c164afdf0ac242c4632c3deb108e052df3dbcdf /src
parentc192919a8fe2afb3c2c74b9dcdc3e7b64e89a423 (diff)
further vote improvements
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_draw.c7
-rw-r--r--src/game/g_cmds.c14
2 files changed, 11 insertions, 10 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index b4673c6..bdaa20b 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -3148,7 +3148,7 @@ CG_DrawVote
*/
static void CG_DrawVote( void )
{
- char *s;
+ char *s, *s2;
int sec;
vec4_t white = { 1.0f, 1.0f, 1.0f, 1.0f };
char yeskey[ 32 ], nokey[ 32 ];
@@ -3169,9 +3169,10 @@ static void CG_DrawVote( void )
sec = 0;
Q_strncpyz( yeskey, CG_KeyBinding( "vote yes" ), sizeof( yeskey ) );
Q_strncpyz( nokey, CG_KeyBinding( "vote no" ), sizeof( nokey ) );
- s = va( "VOTE(%i): \"%s\" [%s]Yes:%i [%s]No:%i", sec, cgs.voteString,
- yeskey, cgs.voteYes, nokey, cgs.voteNo );
+ s = va( "^9Vote called! ^7- ^C%s^7", cgs.voteString );
+ s2 = va( "^9Status ^7- ^7[^2%s^7]^ZYes: %i ^7- ^7[^1%s^7]^ANo: %i^7 - ^9%i^7 seconds remaining,", yeskey, cgs.voteYes, nokey, cgs.voteNo, sec );
CG_Text_Paint( 8, 340, 0.3f, white, s, 0, 0, ITEM_TEXTSTYLE_NORMAL );
+ CG_Text_Paint( 8, 360, 0.3f, white, s2, 0, 0, ITEM_TEXTSTYLE_NORMAL );
}
/*
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index a2f0fc5..54252e7 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1845,7 +1845,7 @@ void Cmd_CallVote_f( gentity_t *ent )
if( G_MapExists( g_nextMap.string ) )
{
trap_SendServerCommand( ent - g_entities, va( "print \"callvote: "
- "the next map is already set to '%s^7'\n\"", g_nextMap.string ) );
+ "the next map is already set to ^7'%s^7'\n\"", g_nextMap.string ) );
return;
}
@@ -1873,7 +1873,7 @@ void Cmd_CallVote_f( gentity_t *ent )
Com_sprintf( level.voteString, sizeof( level.voteString ),
"set g_nextMap %s", arg2 );
Com_sprintf( level.voteDisplayString,
- sizeof( level.voteDisplayString ), "Set the next map to '%s^7'", arg2 );
+ sizeof( level.voteDisplayString ), "Set the next map to ^7'%s^7'", arg2 );
level.votePassThreshold = g_mapVotesPercent.integer;
}
else if( !Q_stricmp( arg1, "draw" ) )
@@ -2067,11 +2067,11 @@ void Cmd_CallVote_f( gentity_t *ent )
if( level.votePassThreshold!=50 )
{
- Q_strcat( level.voteDisplayString, sizeof( level.voteDisplayString ), va( "^7 (Needs > %d percent)", level.votePassThreshold ) );
+ Q_strcat( level.voteDisplayString, sizeof( level.voteDisplayString ), va( "^7 (Needs > ^A%d^7 percent)", level.votePassThreshold ) );
}
if ( reason[0]!='\0' )
- Q_strcat( level.voteDisplayString, sizeof( level.voteDisplayString ), va( " Reason: '%s^7'", reason ) );
+ Q_strcat( level.voteDisplayString, sizeof( level.voteDisplayString ), va( "^7 - reason: ^7'%s^7'", reason ) );
G_admin_adminlog_log( ent, "vote", NULL, 0, qtrue );
@@ -2083,7 +2083,7 @@ void Cmd_CallVote_f( gentity_t *ent )
G_LogPrintf("Vote: %s^7 called a vote: %s^7\n", ent->client->pers.netname, level.voteDisplayString );
- Q_strcat( level.voteDisplayString, sizeof( level.voteDisplayString ), va( " Called by: '%s^7'", ent->client->pers.netname ) );
+ Q_strcat( level.voteDisplayString, sizeof( level.voteDisplayString ), va( "^7 - called by: %s^7", ent->client->pers.netname ) );
ent->client->pers.voteCount++;
@@ -2530,7 +2530,7 @@ void Cmd_CallTeamVote_f( gentity_t *ent )
G_admin_adminlog_log( ent, "teamvote", arg1, 0, qtrue );
if ( reason[0]!='\0' )
- Q_strcat( level.teamVoteDisplayString[ cs_offset ], sizeof( level.teamVoteDisplayString[ cs_offset ] ), va( " Reason: '%s'^7", reason ) );
+ Q_strcat( level.teamVoteDisplayString[ cs_offset ], sizeof( level.teamVoteDisplayString[ cs_offset ] ), va( "^7 - reason: ^7'%s^7'", reason ) );
for( i = 0 ; i < level.maxclients ; i++ )
{
@@ -2559,7 +2559,7 @@ void Cmd_CallTeamVote_f( gentity_t *ent )
else if(team==PTE_HUMANS)
G_LogPrintf("Teamvote: %s^7 called a teamvote (humans): %s^7\n", ent->client->pers.netname, level.teamVoteDisplayString[ cs_offset ] );
- Q_strcat( level.teamVoteDisplayString[ cs_offset ], sizeof( level.teamVoteDisplayString[ cs_offset ] ), va( " Called by: '%s^7'", ent->client->pers.netname ) );
+ Q_strcat( level.teamVoteDisplayString[ cs_offset ], sizeof( level.teamVoteDisplayString[ cs_offset ] ), va( "^7 - called by: ^7'%s^7'", ent->client->pers.netname ) );
// start the voting, the caller autoamtically votes yes
level.teamVoteTime[ cs_offset ] = level.time;