From aba072f6403cbc9acd818da36e7baeec1a43fd06 Mon Sep 17 00:00:00 2001 From: Mittendrein Markus Date: Wed, 2 Sep 2015 18:20:13 +0200 Subject: Show a option to disable GameComments if the host has the GameComment-feature --- TemplePushing.c4s/Script.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'TemplePushing.c4s/Script.c') diff --git a/TemplePushing.c4s/Script.c b/TemplePushing.c4s/Script.c index a75c6cf..bc2dfcd 100644 --- a/TemplePushing.c4s/Script.c +++ b/TemplePushing.c4s/Script.c @@ -25,9 +25,12 @@ static suddendeathEnabled; static loadingSection; static eliminatedPlayers; static gameStartMessage, countdown, gameStarted, gameOver; +static useGameComment; func Initialize() { + RequestHostFeature("GameComment"); + ShowLobby(); eliminatedPlayers = []; @@ -175,6 +178,7 @@ func SetupDone(object menu, string message) numRelaunches = BoundBy(menu->LocalN("numRelaunches"), 3, 10); deathmatchEnabled = menu->LocalN("deathmatchEnabled"); deathmatchWinScore = menu->LocalN("deathmatchWinScore"); + useGameComment = HaveHostFeature("GameComment") && menu->LocalN("useGameComment"); menu->RemoveObject(); gameStartMessage = message; @@ -725,8 +729,9 @@ func ToggleAmbienceSounds(int player) func UpdateComment(bool inLobby) { + if (!IsHost()) return; if (inLobby) SetGameComment(" $LobbyComment$"); - else + else if (useGameComment) { var score = ""; var teams = []; @@ -759,4 +764,5 @@ func UpdateComment(bool inLobby) SetGameComment(Format(" $GameComment$", GetName(0, sectionID), modes[mode][1], sudden, goalDesc, score)); } + else SetGameComment(""); } -- cgit v1.2.3-54-g00ecf