Changeset - r2696:2c5f2d1dbfe3
[Not reviewed]
master
0 4 0
truelight - 19 years ago 2005-11-26 16:18:15
truelight@openttd.org
(svn r3238) -Fix: always save if you want GPMI-based AIs, this on request by
Darkvater, so we can, in the future, save patch options in savegames
without any problems.
4 files changed with 0 insertions and 14 deletions:
0 comments (0 inline, 0 general)
ai/ai.c
Show inline comments
 
@@ -244,9 +244,7 @@ void AI_PlayerDied(PlayerID player)
 
void AI_Initialize(void)
 
{
 
	bool tmp_ai_network_client = _ai.network_client;
 
#ifdef GPMI
 
	bool tmp_ai_gpmi = _ai.gpmi;
 
#endif /* GPMI */
 

	
 
	memset(&_ai, 0, sizeof(_ai));
 
	memset(&_ai_player, 0, sizeof(_ai_player));
 
@@ -254,9 +252,7 @@ void AI_Initialize(void)
 
	_ai.network_client = tmp_ai_network_client;
 
	_ai.network_playas = OWNER_SPECTATOR;
 
	_ai.enabled = true;
 
#ifdef GPMI
 
	_ai.gpmi = tmp_ai_gpmi;
 
#endif /* GPMI */
 
}
 

	
 
/**
ai/ai.h
Show inline comments
 
@@ -39,9 +39,7 @@ typedef struct AIStruct {
 
	bool network_client;    //! Are we a network_client?
 
	uint8 network_playas;   //! The current network player we are connected as
 

	
 
#ifdef GPMI
 
	bool gpmi;              //! True if we want GPMI AIs
 
#endif /* GPMI */
 
} AIStruct;
 

	
 
VARDEF AIStruct _ai;
settings.c
Show inline comments
 
@@ -11,9 +11,7 @@
 
#include "variables.h"
 
#include "network.h"
 
#include "settings.h"
 
#ifdef GPMI
 
#include "ai/ai.h"
 
#endif /* GPMI */
 

	
 
typedef struct IniFile IniFile;
 
typedef struct IniItem IniItem;
 
@@ -946,9 +944,7 @@ const SettingDesc patch_settings[] = {
 

	
 
	{"ainew_active",				SDT_BOOL,		(void*)false, &_patches.ainew_active,					NULL},
 
	{"ai_in_multiplayer",		SDT_BOOL,		(void*)false, &_patches.ai_in_multiplayer,		NULL},
 
#ifdef GPMI
 
	{"ai_gpmi",							SDT_BOOL,		(void*)true,	&_ai.gpmi,											NULL},
 
#endif /* GPMI */
 

	
 
	{"map_x", SDT_UINT32, (void*)8, &_patches.map_x, NULL},
 
	{"map_y", SDT_UINT32, (void*)8, &_patches.map_y, NULL},
settings_gui.c
Show inline comments
 
@@ -19,9 +19,7 @@
 
#include "console.h"
 
#include "town.h"
 
#include "variables.h"
 
#ifdef GPMI
 
#include "ai/ai.h"
 
#endif /* GPMI */
 

	
 
static uint32 _difficulty_click_a;
 
static uint32 _difficulty_click_b;
 
@@ -763,9 +761,7 @@ static const PatchEntry _patches_economy
 
static const PatchEntry _patches_ai[] = {
 
	{PE_BOOL,		0, STR_CONFIG_PATCHES_AINEW_ACTIVE, "ainew_active", &_patches.ainew_active, 0, 1, 1, &AiNew_PatchActive_Warning},
 
	{PE_BOOL,		0, STR_CONFIG_PATCHES_AI_IN_MULTIPLAYER, "ai_in_multiplayer", &_patches.ai_in_multiplayer, 0, 1, 1, &Ai_In_Multiplayer_Warning},
 
#ifdef GPMI
 
	{PE_BOOL,		0, STR_CONFIG_PATCHES_AI_GPMI, "ai_gpmi", &_ai.gpmi, 0, 1, 1, NULL},
 
#endif /* GPMI */
 

	
 
	{PE_BOOL,		0, STR_CONFIG_PATCHES_AI_BUILDS_TRAINS, "ai_disable_veh_train", &_patches.ai_disable_veh_train,			0,  0,  0, NULL},
 
	{PE_BOOL,		0, STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH,"ai_disable_veh_roadveh",&_patches.ai_disable_veh_roadveh,		0,  0,  0, NULL},
0 comments (0 inline, 0 general)