(svn r13658) [NoAI] -Fix r13656: to maintain savegame compatibility with trunk, don't allow setting max_opcodes, but force it to value 4000. noai
authortruebrain
Mon, 30 Jun 2008 13:36:06 +0000
branchnoai
changeset 11100 b960288098b9
parent 11099 7683a97b89f9
child 11101 94e33f3174a6
(svn r13658) [NoAI] -Fix r13656: to maintain savegame compatibility with trunk, don't allow setting max_opcodes, but force it to value 4000.
src/settings.cpp
src/settings_gui.cpp
--- a/src/settings.cpp	Mon Jun 30 13:35:29 2008 +0000
+++ b/src/settings.cpp	Mon Jun 30 13:36:06 2008 +0000
@@ -1668,7 +1668,8 @@
 	    SDT_BOOL(GameSettings, ai.ai_disable_veh_roadveh,                                           0, 0, false,                    STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH,      NULL),
 	    SDT_BOOL(GameSettings, ai.ai_disable_veh_aircraft,                                          0, 0, false,                    STR_CONFIG_PATCHES_AI_BUILDS_AIRCRAFT,     NULL),
 	    SDT_BOOL(GameSettings, ai.ai_disable_veh_ship,                                              0, 0, false,                    STR_CONFIG_PATCHES_AI_BUILDS_SHIPS,        NULL),
-	    SDT_VAR(GameSettings, ai.ai_max_opcode_till_suspend,  SLE_UINT32,                     0, NG, 4000,   100, 40000, 100, STR_CONFIG_PATCHES_AI_MAX_OPCODES,         NULL),
+	    /* Disabled until NoAI is merged to trunk, to maintain savegame compatibility with trunk. */
+//	 SDT_CONDVAR(GameSettings, ai.ai_max_opcode_till_suspend, 98, SL_MAX_VERSION, SLE_UINT32,       0, NG, 4000,   100, 40000, 100, STR_CONFIG_PATCHES_AI_MAX_OPCODES,         NULL),
 
 	     SDT_VAR(GameSettings, vehicle.extend_vehicle_life,          SLE_UINT8,                     0, 0,     0,     0,     100, 0, STR_NULL,                                  NULL),
 	     SDT_VAR(GameSettings, economy.dist_local_authority,         SLE_UINT8,                     0, 0,    20,     5,      60, 0, STR_NULL,                                  NULL),
@@ -2386,6 +2387,8 @@
 		_settings_newgame.pf.opf.pf_maxdepth = 48;
 		_settings_newgame.pf.opf.pf_maxlength = 4096;
 	}
+	/* To maintain savegame compatibility with trunk, we force this value for now. */
+	_settings_newgame.ai.ai_max_opcode_till_suspend = 4000;
 }
 
 extern const ChunkHandler _setting_chunk_handlers[] = {
--- a/src/settings_gui.cpp	Mon Jun 30 13:35:29 2008 +0000
+++ b/src/settings_gui.cpp	Mon Jun 30 13:36:06 2008 +0000
@@ -667,7 +667,8 @@
 	"ai.ai_disable_veh_roadveh",
 	"ai.ai_disable_veh_aircraft",
 	"ai.ai_disable_veh_ship",
-	"ai.ai_max_opcode_till_suspend",
+	/* See note in settings.cpp */
+//	"ai.ai_max_opcode_till_suspend",
 };
 
 static const char *_patches_vehicles[] = {