Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Controls/StartGameControl.js
Show All 28 Lines | class StartGameControl | ||||
launchGame() | launchGame() | ||||
{ | { | ||||
this.gameStarted = true; | this.gameStarted = true; | ||||
for (let handler of this.gameLaunchHandlers) | for (let handler of this.gameLaunchHandlers) | ||||
handler(); | handler(); | ||||
Engine.SetRankedGame(g_NewGameSettings.rating.enabled); | |||||
if (g_IsNetworked) | if (g_IsNetworked) | ||||
Engine.StartNetworkGame(); | Engine.StartNetworkGame(); | ||||
else | else | ||||
{ | { | ||||
Engine.StartGame(g_GameAttributes, g_PlayerAssignments.local.player); | Engine.StartGame(g_NewGameSettings.LegacySerialize(), g_PlayerAssignments.local.player); | ||||
this.switchToLoadingPage(); | this.switchToLoadingPage(); | ||||
} | } | ||||
} | } | ||||
switchToLoadingPage() | switchToLoadingPage() | ||||
{ | { | ||||
Engine.SwitchGuiPage("page_loading.xml", { | Engine.SwitchGuiPage("page_loading.xml", { | ||||
"attribs": g_GameAttributes, | "attribs": g_NewGameSettings.LegacySerialize(), | ||||
"playerAssignments": g_PlayerAssignments | "playerAssignments": g_PlayerAssignments | ||||
}); | }); | ||||
} | } | ||||
} | } |
Wildfire Games · Phabricator