Fixes invalid civ check in rmgen.
Removes some default data from the Atlas blank map. Changes default civ in autostart-random mode. This was SVN commit r11809.
This commit is contained in:
parent
c8d68f6e0b
commit
1f5f82f375
@ -468,10 +468,10 @@ function primeSortPlayers(source)
|
||||
function getStartingEntities(player)
|
||||
{
|
||||
var civ = getCivCode(player);
|
||||
if (!g_CivData[civ] || (g_CivData[civ].SelectableInGameSetup !== undefined && !g_CivData[civ].SelectableInGameSetup) || !g_CivData[civ].StartEntities || !g_CivData[civ].StartEntities.length)
|
||||
if (!g_CivData[civ] || !g_CivData[civ].StartEntities || !g_CivData[civ].StartEntities.length)
|
||||
{
|
||||
warn("Invalid or unimplemented civ '"+civ+"' specified, falling back to 'hele'");
|
||||
civ = "hele";
|
||||
warn("Invalid or unimplemented civ '"+civ+"' specified, falling back to 'athen'");
|
||||
civ = "athen";
|
||||
}
|
||||
|
||||
return g_CivData[civ].StartEntities;
|
||||
|
BIN
binaries/data/mods/public/maps/scenarios/_default.xml
(Stored with Git LFS)
BIN
binaries/data/mods/public/maps/scenarios/_default.xml
(Stored with Git LFS)
Binary file not shown.
@ -1116,7 +1116,9 @@ bool Autostart(const CmdLineArgs& args)
|
||||
CScriptVal player;
|
||||
scriptInterface.Eval("({})", player);
|
||||
|
||||
scriptInterface.SetProperty(player.get(), "Civ", std::string("hele"));
|
||||
// We could load player_defaults.json here, but that would complicate the logic
|
||||
// even more and autostart is only intended for developers anyway
|
||||
scriptInterface.SetProperty(player.get(), "Civ", std::string("athen"));
|
||||
scriptInterface.SetPropertyInt(playerData.get(), i, player);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user