From d18ead9151af1e5bcd7813544f531b2cb1e21a00 Mon Sep 17 00:00:00 2001 From: Mittendrein Markus Date: Wed, 10 Feb 2016 22:22:31 +0100 Subject: Add deathmatch win-score upper and lower limits with 10 and 30 respectively --- TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c | 4 ++-- TemplePushing.c4s/Script.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'TemplePushing.c4s') diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c index 6082ca5..6bd8790 100644 --- a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c @@ -155,11 +155,11 @@ private func SelectSetting(int selectedSetting) } else if (selectedSetting == SETTING_DeathmatchScoreInc) { - ++deathmatchWinScore; + deathmatchWinScore = Min(deathmatchWinScore + 1, 30); } else if (selectedSetting == SETTING_DeathmatchScoreDec) { - deathmatchWinScore = Max(deathmatchWinScore - 1, 1); + deathmatchWinScore = Max(deathmatchWinScore - 1, 10); } ShowMessage(); diff --git a/TemplePushing.c4s/Script.c b/TemplePushing.c4s/Script.c index 93a2d46..7ef5474 100644 --- a/TemplePushing.c4s/Script.c +++ b/TemplePushing.c4s/Script.c @@ -171,7 +171,7 @@ func SetupDone(object menu, string message) ambienceEnabled = menu->LocalN("ambienceEnabled"); numRelaunches = BoundBy(menu->LocalN("numRelaunches"), 3, 10); deathmatchEnabled = menu->LocalN("deathmatchEnabled"); - deathmatchWinScore = menu->LocalN("deathmatchWinScore"); + deathmatchWinScore = BoundBy(menu->LocalN("deathmatchWinScore"), 10, 30); menu->RemoveObject(); gameStartMessage = message; -- cgit v1.2.3-54-g00ecf