From 71347cae430c9e7488db47dce38f7b6e66aa92b9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 Jun 2007 21:06:51 +0000 Subject: [PATCH] (svn r10282) [0.5] -Fix: compilation without networking support. [0.5] -Fix: crashes with subsidy messages when using Korean as language. --- intro_gui.c | 2 ++ main_gui.c | 2 ++ players.c | 2 ++ strgen/strgen.c | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/intro_gui.c b/intro_gui.c index 37de9e7a9e..36b6d96229 100644 --- a/intro_gui.c +++ b/intro_gui.c @@ -66,7 +66,9 @@ static void SelectGameWndProc(Window *w, WindowEvent *e) case WE_CLICK: /* Do not create a network server when you (just) have closed one of the game * creation/load windows for the network server. */ +#ifdef ENABLE_NETWORK if (2 <= e->we.click.widget && e->we.click.widget <= 6) _is_network_server = false; +#endif /* ENABLE_NETWORK */ switch (e->we.click.widget) { case 2: ShowGenerateLandscape(); break; diff --git a/main_gui.c b/main_gui.c index 88fec4d8dd..11d08ea6cd 100644 --- a/main_gui.c +++ b/main_gui.c @@ -55,6 +55,7 @@ extern bool GenerateTowns(void); void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2) { +#ifdef ENABLE_NETWORK char msg[20]; if (!success) return; /* Inform the player of this action */ @@ -64,6 +65,7 @@ void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2) } else { NetworkServer_HandleChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, NETWORK_SERVER_INDEX); } +#endif /* ENABLE_NETWORK */ } void HandleOnEditText(WindowEvent *e) diff --git a/players.c b/players.c index e023984dc1..3327408045 100644 --- a/players.c +++ b/players.c @@ -838,7 +838,9 @@ int32 CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) * _local_player/_network_playas: what they play as * cid = requested company/player of joining client */ Player *p; +#ifdef ENABLE_NETWORK uint16 cid = p2; // ClientID +#endif /* ENABLE_NETWORK */ /* This command is only executed in a multiplayer game */ if (!_networking) return CMD_ERROR; diff --git a/strgen/strgen.c b/strgen/strgen.c index bc11c0576f..f85329fec7 100644 --- a/strgen/strgen.c +++ b/strgen/strgen.c @@ -469,7 +469,7 @@ static const CmdStruct _cmd_structs[] = { // These are special versions of {STRING1} // The first string includes the second string. - {"COMPANY", EmitSingleChar, SCC_STRING1, 1, 0}, + {"COMPANY", EmitSingleChar, SCC_STRING1, 2, 0}, {"PLAYERNAME", EmitSingleChar, SCC_STRING1, 1, 0}, {"VEHICLE", EmitSingleChar, SCC_STRING1, 1, 0},