Skip to content

Commit

Permalink
Display veto information to gotv uses, close splewis#279 (splewis#281).
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoblazed authored and splewis committed Aug 25, 2018
1 parent 20ede45 commit 8cbbdb0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripting/get5.sp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ConVar g_CheckAuthsCvar;
ConVar g_DamagePrintCvar;
ConVar g_DamagePrintFormat;
ConVar g_DemoNameFormatCvar;
ConVar g_DisplayGotvVeto;
ConVar g_EndMatchOnEmptyServerCvar;
ConVar g_EventLogFormatCvar;
ConVar g_FixedPauseTimeCvar;
Expand Down Expand Up @@ -260,6 +261,8 @@ public void OnPluginStart() {
"If set to 0, get5 will not force players to the correct team based on steamid");
g_DemoNameFormatCvar = CreateConVar("get5_demo_name_format", "{MATCHID}_map{MAPNUMBER}_{MAPNAME}",
"Format for demo file names, use \"\" to disable");
g_DisplayGotvVeto = CreateConVar("get5_display_gotv_veto", "0",
"Whether to wait for map vetos to be printed to GOTV before changing map");
g_EndMatchOnEmptyServerCvar = CreateConVar(
"get5_end_match_on_empty_server", "0",
"Whether to end the match if all players disconnect before ending. No winner is set if this happens.");
Expand Down Expand Up @@ -495,6 +498,8 @@ public Action Timer_InfoMessages(Handle timer) {
}
}
MissingPlayerInfoMessage();
} else if (g_DisplayGotvVeto.BoolValue && g_GameState == Get5State_Warmup && g_MapChangePending) {
Get5_MessageToAll("%t", "WaitingForGOTVVetoInfoMessage");
}

// Handle waiting for knife decision
Expand Down Expand Up @@ -999,7 +1004,13 @@ public Action Timer_NextMatchMap(Handle timer) {
int index = GetMapNumber();
char map[PLATFORM_MAX_PATH];
g_MapsToPlay.GetString(index, map, sizeof(map));
ChangeMap(map);

if (!g_SkipVeto && g_DisplayGotvVeto.BoolValue && index == 0) {
float minDelay = float(GetTvDelay()) + MATCH_END_DELAY_AFTER_TV;
ChangeMap(map, minDelay);
} else {
ChangeMap(map);
}
}

public void KickClientsOnEnd() {
Expand Down
4 changes: 4 additions & 0 deletions translations/get5.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
{
"en" "The map will change once the GOTV broadcast has ended."
}
"WaitingForGOTVVetoInfoMessage"
{
"en" "The map will change once the GOTV broadcast has been displayed the map vetos."
}
"NoMatchSetupInfoMessage"
{
"en" "There is no match setup"
Expand Down

0 comments on commit 8cbbdb0

Please sign in to comment.