Changeset - r5441:5f6cfce5d8ca
[Not reviewed]
master
0 3 0
Darkvater - 17 years ago 2006-12-31 11:12:49
darkvater@openttd.org
(svn r7692) -Fix: OpenTTD didn't compile without network enabled (newgrf sync code)
3 files changed with 10 insertions and 1 deletions:
0 comments (0 inline, 0 general)
newgrf_config.c
Show inline comments
 
@@ -325,12 +325,14 @@ const GRFConfig *FindGRFConfig(uint32 gr
 
		}
 
	}
 

	
 
	return NULL;
 
}
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
/** Structure for UnknownGRFs; this is a lightweight variant of GRFConfig */
 
typedef struct UnknownGRF UnknownGRF;
 
struct UnknownGRF {
 
	UnknownGRF *next;
 
	uint32 grfid;
 
	uint8  md5sum[16];
 
@@ -374,12 +376,14 @@ char *FindUnknownGRFName(uint32 grfid, u
 
	memcpy(grf->md5sum, md5sum, sizeof(grf->md5sum));
 

	
 
	unknown_grfs = grf;
 
	return grf->name;
 
}
 

	
 
#endif /* ENABLE_NETWORK */
 

	
 

	
 
/* Retrieve a NewGRF from the current config by its grfid */
 
GRFConfig *GetGRFConfig(uint32 grfid)
 
{
 
	GRFConfig *c;
 

	
newgrf_config.h
Show inline comments
 
@@ -52,11 +52,13 @@ bool IsGoodGRFConfigList(void);
 
bool FillGRFDetails(GRFConfig *config, bool is_static);
 
char *GRFBuildParamList(char *dst, const GRFConfig *c, const char *last);
 

	
 
/* In newgrf_gui.c */
 
void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfig **config);
 

	
 
#ifdef ENABLE_NETWORK
 
/* For communication about GRFs over the network */
 
#define UNKNOWN_GRF_NAME_PLACEHOLDER "<Unknown>"
 
char *FindUnknownGRFName(uint32 grfid, uint8 *md5sum, bool create);
 
#endif /* ENABLE_NETWORK */
 

	
 
#endif /* NEWGRF_CONFIG_H */
players.c
Show inline comments
 
@@ -841,13 +841,16 @@ int32 CmdPlayerCtrl(TileIndex tile, uint
 
		uint16 cid = p2; // ClientID
 

	
 
		/* This command is only executed in a multiplayer game */
 
		if (!_networking) return CMD_ERROR;
 

	
 
		/* Has the network client a correct ClientID? */
 
		if (!(flags & DC_EXEC) || cid >= MAX_CLIENT_INFO) return 0;
 
		if (!(flags & DC_EXEC)) return 0;
 
#ifdef ENABLE_NETWORK
 
		if (cid >= MAX_CLIENT_INFO) return 0;
 
#endif /* ENABLE_NETWORK */
 

	
 
		/* Delete multiplayer progress bar */
 
		DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
 

	
 
		p = DoStartupNewPlayer(false);
 

	
0 comments (0 inline, 0 general)