summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/Script.c
diff options
context:
space:
mode:
authorMittendrein Markus <maxmitti@gmx.net>2015-09-02 18:20:13 +0200
committerMittendrein Markus <maxmitti@gmx.net>2015-09-03 19:22:38 +0200
commitaba072f6403cbc9acd818da36e7baeec1a43fd06 (patch)
tree2a824169db3084e4428697ec11951b23329abf86 /TemplePushing.c4s/Script.c
parent736efdaf6aea46dc44322e84656a7a489face44a (diff)
downloadtempelschubsen-aba072f6403cbc9acd818da36e7baeec1a43fd06.tar.gz
tempelschubsen-aba072f6403cbc9acd818da36e7baeec1a43fd06.zip
Show a option to disable GameComments if the host has the GameComment-featuregamecomment
Diffstat (limited to 'TemplePushing.c4s/Script.c')
-rw-r--r--TemplePushing.c4s/Script.c8
1 files changed, 7 insertions, 1 deletions
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("");
}