summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s
diff options
context:
space:
mode:
Diffstat (limited to 'TemplePushing.c4s')
-rw-r--r--TemplePushing.c4s/Script.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/TemplePushing.c4s/Script.c b/TemplePushing.c4s/Script.c
index 535f242..d123912 100644
--- a/TemplePushing.c4s/Script.c
+++ b/TemplePushing.c4s/Script.c
@@ -14,6 +14,8 @@ static section, mode;
static numRelaunches;
static deathmatchEnabled, deathmatchWinScore;
static playerDeaths, playerScore, teamScore;
+static sectionID;
+static extinguisherEnabled, rotateInJumpEnabled;
static ambienceEnabled;
static suddendeathEnabled;
static loadingSection;
@@ -49,8 +51,6 @@ func Initialize()
// Set possible spells
SetScrollSpells([ABLA, MBOT, MFRB, MDBT, GVTY, MLGT, CFAL, MSSH, MINV, MARK, MFWV, MGFL, LAVS, MGPL, ICNL, MDFL, AFST, MGCY, MATT]);
-
- ScriptGo(true);
}
/*func TeamRow(int team) { return 1 + team * 1000; }
@@ -156,20 +156,30 @@ func ShowLobby()
LoadScenarioSection("Lobby");
}
-func StartGame(object menu, string message)
+func SetupDone(object menu, string message)
{
// Copy settings from menu
- var sectionID = menu->LocalN("section");
+ sectionID = menu->LocalN("section");
mode = menu->LocalN("mode");
- var extinguisherEnabled = menu->LocalN("extinguisherEnabled");
+ extinguisherEnabled = menu->LocalN("extinguisherEnabled");
suddendeathEnabled = menu->LocalN("suddendeathEnabled");
- var rotateInJumpEnabled = menu->LocalN("rotateInJumpEnabled");
+ rotateInJumpEnabled = menu->LocalN("rotateInJumpEnabled");
ambienceEnabled = menu->LocalN("ambienceEnabled");
numRelaunches = menu->LocalN("numRelaunches");
deathmatchEnabled = menu->LocalN("deathmatchEnabled");
deathmatchWinScore = menu->LocalN("deathmatchWinScore");
menu->RemoveObject();
+ gameStartMessage = message;
+
+ // Make sure LoadScenarioSection is not called from an object by swapping it out to a script counter callback
+ ScriptGo(true);
+}
+
+func Script0()
+{
+ ScriptGo(false);
+
// Change scenario section
loadingSection = true;
LoadScenarioSection(DefinitionCall(sectionID, "SectionName"));
@@ -243,8 +253,6 @@ func StartGame(object menu, string message)
if (rotateInJumpEnabled) CreateObject(RIJP, 0, 0, NO_OWNER);
CreateObject(OFDR, 0, 0, NO_OWNER);
-
-
// Create mode objects
if (mode == MODE_Magic)
{
@@ -286,7 +294,6 @@ func StartGame(object menu, string message)
InitializePlayer(GetPlayerByIndex(i));
}
- gameStartMessage = message;
ShowCountdown();
}