mirror of https://github.com/OpenTTD/OpenTTD
(svn r10282) [0.5] -Fix: compilation without networking support.
[0.5] -Fix: crashes with subsidy messages when using Korean as language.release/0.5
parent
5edc24e66a
commit
71347cae43
|
@ -66,7 +66,9 @@ static void SelectGameWndProc(Window *w, WindowEvent *e)
|
||||||
case WE_CLICK:
|
case WE_CLICK:
|
||||||
/* Do not create a network server when you (just) have closed one of the game
|
/* Do not create a network server when you (just) have closed one of the game
|
||||||
* creation/load windows for the network server. */
|
* 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;
|
if (2 <= e->we.click.widget && e->we.click.widget <= 6) _is_network_server = false;
|
||||||
|
#endif /* ENABLE_NETWORK */
|
||||||
|
|
||||||
switch (e->we.click.widget) {
|
switch (e->we.click.widget) {
|
||||||
case 2: ShowGenerateLandscape(); break;
|
case 2: ShowGenerateLandscape(); break;
|
||||||
|
|
|
@ -55,6 +55,7 @@ extern bool GenerateTowns(void);
|
||||||
|
|
||||||
void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_NETWORK
|
||||||
char msg[20];
|
char msg[20];
|
||||||
if (!success) return;
|
if (!success) return;
|
||||||
/* Inform the player of this action */
|
/* Inform the player of this action */
|
||||||
|
@ -64,6 +65,7 @@ void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
||||||
} else {
|
} else {
|
||||||
NetworkServer_HandleChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, NETWORK_SERVER_INDEX);
|
NetworkServer_HandleChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, NETWORK_SERVER_INDEX);
|
||||||
}
|
}
|
||||||
|
#endif /* ENABLE_NETWORK */
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleOnEditText(WindowEvent *e)
|
void HandleOnEditText(WindowEvent *e)
|
||||||
|
|
|
@ -838,7 +838,9 @@ int32 CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
* _local_player/_network_playas: what they play as
|
* _local_player/_network_playas: what they play as
|
||||||
* cid = requested company/player of joining client */
|
* cid = requested company/player of joining client */
|
||||||
Player *p;
|
Player *p;
|
||||||
|
#ifdef ENABLE_NETWORK
|
||||||
uint16 cid = p2; // ClientID
|
uint16 cid = p2; // ClientID
|
||||||
|
#endif /* ENABLE_NETWORK */
|
||||||
|
|
||||||
/* This command is only executed in a multiplayer game */
|
/* This command is only executed in a multiplayer game */
|
||||||
if (!_networking) return CMD_ERROR;
|
if (!_networking) return CMD_ERROR;
|
||||||
|
|
|
@ -469,7 +469,7 @@ static const CmdStruct _cmd_structs[] = {
|
||||||
|
|
||||||
// These are special versions of {STRING1}
|
// These are special versions of {STRING1}
|
||||||
// The first string includes the second string.
|
// 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},
|
{"PLAYERNAME", EmitSingleChar, SCC_STRING1, 1, 0},
|
||||||
{"VEHICLE", EmitSingleChar, SCC_STRING1, 1, 0},
|
{"VEHICLE", EmitSingleChar, SCC_STRING1, 1, 0},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue