Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions assets/data0_21/l10n/console/descriptions/cg/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ msgstr "<0/1> Critical hit effects will be displayed for high damage value attac
"^6Enable: cg_cartoonHitEffect \"1\"\n"
"^6Note: Critical hit effect color varies based on damage dealt. Green (39 or more), Yellow (50 or more), and Red (64 or more)."

#. Console/cg
msgid "cg_centerVote"
msgstr "<0/1> Displays a centered notice when a vote is in progress.\n"
"^6Disable: cg_centerVote \"0\"\n"
"^6Enable: cg_centerVote \"1\""

#. Console/cg
msgid "cg_chatBeep"
msgstr "<0/1> Plays a chat beep sound when someone sends a message.\n"
Expand Down
6 changes: 6 additions & 0 deletions assets/data0_21/l10n/ui/ui_en.po
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,12 @@ msgstr "chat + center"
msgid "chat + center + icons"
msgstr "chat + center + icons"

msgid "Centered vote notifications"
msgstr "Centered vote notifications"

msgid "Vote in progress - View chat"
msgstr "Vote in progress - View chat"

#. Shows indicators at the top of the teammates, even if they are not visible
#. through the walls
msgid "Show teammates' indicators"
Expand Down
5 changes: 4 additions & 1 deletion assets/data0_21pure/ui/porkui/options_player.rml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@
<option value="7">chat + center + icons</option>
</select>
<br/>


<div class="title">Centered vote notifications</div>
<input cvar="cg_centerVote" type="checkbox" realtime="1"/>

<div class="title">Show teammates' indicators</div>
<input cvar="cg_showTeamMates" type="checkbox" realtime="1"/>

Expand Down
1 change: 1 addition & 0 deletions assets/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set cg_autoaction_screenshot "0"
set cg_autoaction_spectator "0"
set cg_bloodTrail "10"
set cg_bloodTrailAlpha "1.0"
set cg_centerVote "1"
set cg_chatBeep "1"
set cg_chatFilter "0"
set cg_chatFilterTV "2"
Expand Down
1 change: 1 addition & 0 deletions source/cgame/cg_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ extern cvar_t *cg_raceGhostsAlpha;
extern cvar_t *cg_chatBeep;
extern cvar_t *cg_chatFilter;
extern cvar_t *cg_chatFilterTV;
extern cvar_t *cg_centerVote;

//force models
extern cvar_t *cg_teamPLAYERSmodel;
Expand Down
8 changes: 5 additions & 3 deletions source/cgame/cg_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ cvar_t *cg_raceGhostsAlpha;
cvar_t *cg_chatBeep;
cvar_t *cg_chatFilter;
cvar_t *cg_chatFilterTV;
cvar_t *cg_centerVote;

cvar_t *cg_cartoonEffects;
cvar_t *cg_cartoonHitEffect;
Expand Down Expand Up @@ -747,9 +748,10 @@ static void CG_RegisterVariables( void )
cg_handicap = trap_Cvar_Get( "handicap", "0", CVAR_USERINFO | CVAR_ARCHIVE );
cg_clan = trap_Cvar_Get( "clan", "", CVAR_USERINFO | CVAR_ARCHIVE );
cg_movementStyle = trap_Cvar_Get( "cg_movementStyle", "0", CVAR_USERINFO | CVAR_ARCHIVE );
cg_noAutohop = trap_Cvar_Get( "cg_noAutohop", "0", CVAR_USERINFO | CVAR_ARCHIVE );
cg_fov = trap_Cvar_Get( "fov", "100", CVAR_ARCHIVE );
cg_zoomfov = trap_Cvar_Get( "zoomfov", "30", CVAR_ARCHIVE );
cg_noAutohop = trap_Cvar_Get( "cg_noAutohop", "0", CVAR_USERINFO | CVAR_ARCHIVE );
cg_centerVote = trap_Cvar_Get( "cg_centerVote", "1", CVAR_USERINFO | CVAR_ARCHIVE );
cg_fov = trap_Cvar_Get( "fov", "100", CVAR_ARCHIVE );
cg_zoomfov = trap_Cvar_Get( "zoomfov", "30", CVAR_ARCHIVE );

cg_addDecals = trap_Cvar_Get( "cg_decals", "1", CVAR_ARCHIVE );
//cg_footSteps = trap_Cvar_Get( "cg_footSteps", "1", 0 );
Expand Down
37 changes: 36 additions & 1 deletion source/game/g_callvotes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2099,7 +2099,7 @@ static void G_CallVotes_CheckState( void )
clientVoted[PLAYERNUM( ent )] == VOTED_NOTHING ) {
continue;
}
}
}


if( callvoteState.vote.callvote->need_auth && sv_mm_enable->integer ) {
Expand Down Expand Up @@ -2142,6 +2142,24 @@ static void G_CallVotes_CheckState( void )
{
if( callvoteState.timeout - game.realtime <= 7500 && callvoteState.timeout - game.realtime > 2500 )
G_AnnouncerSound( NULL, trap_SoundIndex( S_ANNOUNCER_CALLVOTE_VOTE_NOW ), GS_MAX_TEAMS, true, NULL );

char *ival;
int iCenterVoteEnabled;
edict_t *i;

// If a player doesn't have "Centered vote notifications" disabled, and they still have not voted, notify them of the vote via center print
for( i = game.edicts + 1; PLAYERNUM( i ) < gs.maxclients; i++ )
{
iCenterVoteEnabled = 1;
ival = NULL;
ival = Info_ValueForKey( i->r.client->userinfo, "cg_centerVote" );
if( ival )
iCenterVoteEnabled = atoi( ival );

if ( iCenterVoteEnabled != 0 && clientVoted[PLAYERNUM( i )] == VOTED_NOTHING )
G_CenterPrintMsg( i, S_COLOR_YELLOW "Vote in progress - View chat");
}

G_PrintMsg( NULL, "Vote in progress: %s%s%s, %i voted yes, %i voted no. %i required\n", S_COLOR_YELLOW,
G_CallVotes_String( &callvoteState.vote ), S_COLOR_WHITE, yeses, noes,
needvotes + 1 );
Expand Down Expand Up @@ -2403,6 +2421,23 @@ static void G_CallVote( edict_t *ent, bool isopcall )

G_AnnouncerSound( NULL, trap_SoundIndex( va( S_ANNOUNCER_CALLVOTE_CALLED_1_to_2, ( rand()&1 )+1 ) ), GS_MAX_TEAMS, true, NULL );

char *zval;
int zCenterVoteEnabled;
edict_t *z;

// If a player doesn't have "Centered vote notifications" disabled, and they still have not voted, notify them of the vote via center print
for( z = game.edicts + 1; PLAYERNUM( z ) < gs.maxclients; z++ )
{
zCenterVoteEnabled = 1;
zval = NULL;
zval = Info_ValueForKey( z->r.client->userinfo, "cg_centerVote" );
if( zval )
zCenterVoteEnabled = atoi( zval );

if ( zCenterVoteEnabled != 0 && clientVoted[PLAYERNUM( z )] == VOTED_NOTHING )
G_CenterPrintMsg( z, S_COLOR_YELLOW "Vote in progress - View chat");
}

G_PrintMsg( NULL, "%s" S_COLOR_WHITE " requested to vote " S_COLOR_YELLOW "%s\n",
ent->r.client->netname, G_CallVotes_String( &callvoteState.vote ) );

Expand Down