Enable cheats in autostarted games because the JS gamesetup enables them in singleplayer and because the autostarted multiplayer mode relies on the change-perspective feature to control players.

Differential Revision: https://code.wildfiregames.com/D453
Refs #2676
Reviewed By: echotangoecho
This was SVN commit r19557.
This commit is contained in:
elexis 2017-05-11 22:32:41 +00:00
parent 3cd2055ca7
commit c288278229
2 changed files with 3 additions and 4 deletions

View file

@ -25,7 +25,7 @@ Multiplayer:
Examples:
1) "Bob" will host a 2 player game on the Arcadia map:
-autostart="scenarios/Arcadia 02" -autostart-host -autostart-host-players=2 -autostart-playername="Bob"
-autostart="scenarios/Arcadia" -autostart-host -autostart-host-players=2 -autostart-playername="Bob"
2) Load Alpine Lakes random map with random seed, 2 players (Athens and Britons), and player 2 is PetraBot:
-autostart="random/alpine_lakes" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=2:petra

View file

@ -1216,7 +1216,7 @@ CStr8 LoadSettingsOfScenarioMap(const VfsPath &mapPath)
*
* Examples:
* 1) "Bob" will host a 2 player game on the Arcadia map:
* -autostart="scenarios/Arcadia 02" -autostart-host -autostart-host-players=2 -autostart-playername="Bob"
* -autostart="scenarios/Arcadia" -autostart-host -autostart-host-players=2 -autostart-playername="Bob"
*
* 2) Load Alpine Lakes random map with random seed, 2 players (Athens and Britons), and player 2 is PetraBot:
* -autostart="random/alpine_lakes" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=2:petra
@ -1340,6 +1340,7 @@ bool Autostart(const CmdLineArgs& args)
scriptInterface.SetProperty(attrs, "mapType", mapType);
scriptInterface.SetProperty(attrs, "map", std::string("maps/" + autoStartName));
scriptInterface.SetProperty(settings, "mapType", mapType);
scriptInterface.SetProperty(settings, "CheatsEnabled", true);
// Set seed for AIs
u32 aiseed = 0;
@ -1485,9 +1486,7 @@ bool Autostart(const CmdLineArgs& args)
// Get optional playername
CStrW userName = L"anonymous";
if (args.Has("autostart-playername"))
{
userName = args.Get("autostart-playername").FromUTF8();
}
if (args.Has("autostart-host"))
{