(svn r10282) [0.5] -Fix: compilation without networking support.
[0.5] -Fix: crashes with subsidy messages when using Korean as language.
--- a/intro_gui.c Fri Jun 22 20:20:36 2007 +0000
+++ b/intro_gui.c Fri Jun 22 21:06:51 2007 +0000
@@ -66,7 +66,9 @@
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;
--- a/main_gui.c Fri Jun 22 20:20:36 2007 +0000
+++ b/main_gui.c Fri Jun 22 21:06:51 2007 +0000
@@ -55,6 +55,7 @@
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 @@
} else {
NetworkServer_HandleChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, NETWORK_SERVER_INDEX);
}
+#endif /* ENABLE_NETWORK */
}
void HandleOnEditText(WindowEvent *e)
--- a/players.c Fri Jun 22 20:20:36 2007 +0000
+++ b/players.c Fri Jun 22 21:06:51 2007 +0000
@@ -838,7 +838,9 @@
* _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;
--- a/strgen/strgen.c Fri Jun 22 20:20:36 2007 +0000
+++ b/strgen/strgen.c Fri Jun 22 21:06:51 2007 +0000
@@ -469,7 +469,7 @@
// 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},