From 3f1748337967864703427cb2d3c7a7731484d87a Mon Sep 17 00:00:00 2001 From: krazykaze81 Date: Wed, 14 Apr 2021 10:54:23 -0400 Subject: [PATCH] Do not show complaint popup in tournament mode --- src/cgame/cg_draw.c | 6 ++++++ src/game/g_cmds.c | 3 +++ src/game/g_main.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index b8d7bf1b..5492fa03 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2689,6 +2689,12 @@ static void CG_DrawVote( void ) { if ( cgs.complaintEndTime > cg.time ) { + // RtcwPro exit complaint dialog if g_tournament is 1 + const char* info = CG_ConfigString(CS_SERVERINFO); + char* isTournament = Info_ValueForKey(info, "g_tournament"); + if (isTournament != NULL && strcmp(isTournament, "1") == 0) + return; + if ( cgs.complaintClient == -1 ) { s = "Your complaint has been filed"; CG_DrawStringExt( 8, 200, CG_TranslateString( s ), color, qtrue, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 80 ); diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 7ef0b8b7..b11d87ed 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1743,7 +1743,10 @@ void Cmd_Vote_f( gentity_t *ent ) { // exit out for comp settings if (g_tournament.integer == 1 || g_complaintlimit.integer == 0) + { + trap_SendServerCommand(ent - g_entities, "complaint -2"); return; + } gclient_t *cl = g_entities[ ent->client->pers.complaintClient ].client; if ( !cl ) { diff --git a/src/game/g_main.c b/src/game/g_main.c index 7e92fcd0..2d3fe53e 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -575,7 +575,7 @@ cvarTable_t gameCvarTable[] = { { &g_maxTeamFlamer, "g_maxTeamFlamer", "1", CVAR_ARCHIVE | CVAR_LATCH, 0, qtrue }, { &g_duelAutoPause, "g_duelAutoPause", "0", CVAR_ARCHIVE, 0, qfalse }, { &team_nocontrols, "team_nocontrols", "1", CVAR_ARCHIVE, 0, qfalse }, - { &g_tournament, "g_tournament", "0", CVAR_ARCHIVE | CVAR_LATCH, 0, qtrue }, + { &g_tournament, "g_tournament", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_SERVERINFO, 0, qtrue }, { &g_dbgRevive, "g_dbgRevive", "0", 0, 0, qfalse }, { &g_dropWeapons, "g_dropWeapons", "9", CVAR_ARCHIVE, 0, qtrue, qtrue }, { &g_hsDamage, "g_hsDamage", "50", CVAR_ARCHIVE, 0, qfalse, qtrue },