mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-13 04:55:52 +00:00
Quick JS fixes.
This was SVN commit r2480.
This commit is contained in:
@@ -777,7 +777,8 @@
|
||||
size="50%-100 100%-50 50%-10 100%-20"
|
||||
>Start Game
|
||||
<action on="Press"><![CDATA[
|
||||
StartMap ("MapName","pregame_sp_mapsel", 0);
|
||||
StartMap (getGUIObjectByName("pregame_sp_mapname").caption,
|
||||
"pregame_sp_mapsel", 0);
|
||||
]]></action>
|
||||
</object>
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ function StartMap (MapName, OpenWindow, GameMode)
|
||||
// 1: MP
|
||||
|
||||
// Check whether we have a correct file extension, to avoid crashes
|
||||
MapName = getGUIObjectByName("pregame_sp_mapname").caption;
|
||||
Extension = MapName.substring(MapName.length, MapName.length-4);
|
||||
|
||||
if (Extension != ".pmp")
|
||||
@@ -18,26 +17,22 @@ function StartMap (MapName, OpenWindow, GameMode)
|
||||
MapName = MapName + ".pmp";
|
||||
console.write("Trying to fix the map name (probably missing extension).");
|
||||
}
|
||||
else {console.write("Map Name Inputed Correctly");}
|
||||
else
|
||||
console.write ("Map Name Input Correctly");
|
||||
|
||||
// Close setup window
|
||||
CloseMainMenuSubWindow (OpenWindow);
|
||||
console.write("Closed Setup Window");
|
||||
console.write ("Closed Setup Window");
|
||||
|
||||
// Set up game
|
||||
|
||||
g_GameAttributes.mapFile = MapName;
|
||||
|
||||
console.write("Setting Up Players");
|
||||
|
||||
if (GameMode == "0")
|
||||
{
|
||||
// Set up a bunch of players so we can see them pretty colours. :P
|
||||
console.write ("Setting Up Temporary Single Players");
|
||||
setupSPPlayers();
|
||||
}
|
||||
else {console.write("Players Failed Setup");}
|
||||
|
||||
console.write("Players are now Set Up");
|
||||
|
||||
startLoadingScreen();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user