mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r10145) -Fix: make compiling with networking disabled (again) possible.
This commit is contained in:
parent
8a1c9187a1
commit
197a8fd5f3
|
@ -64,9 +64,11 @@ static void SelectGameWndProc(Window *w, WindowEvent *e)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WE_CLICK:
|
case WE_CLICK:
|
||||||
|
#ifdef ENABLE_NETWORK
|
||||||
/* 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. */
|
||||||
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;
|
||||||
|
|
|
@ -61,6 +61,7 @@ extern bool GenerateTowns();
|
||||||
|
|
||||||
void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_NETWORK
|
||||||
if (!success) return;
|
if (!success) return;
|
||||||
|
|
||||||
char msg[20];
|
char msg[20];
|
||||||
|
@ -72,6 +73,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(const char *str)
|
void HandleOnEditText(const char *str)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "signs.h"
|
#include "signs.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "depot.h"
|
#include "depot.h"
|
||||||
#include "network/network.h"
|
#include "newgrf_config.h"
|
||||||
#include "ai/ai.h"
|
#include "ai/ai.h"
|
||||||
#include "date.h"
|
#include "date.h"
|
||||||
|
|
||||||
|
|
|
@ -1101,7 +1101,11 @@ StringID RemapOldStringID(StringID s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_NETWORK
|
||||||
extern void SortNetworkLanguages();
|
extern void SortNetworkLanguages();
|
||||||
|
#else /* ENABLE_NETWORK */
|
||||||
|
static inline void SortNetworkLanguages() {}
|
||||||
|
#endif /* ENABLE_NETWORK */
|
||||||
extern void SortTownGeneratorNames();
|
extern void SortTownGeneratorNames();
|
||||||
|
|
||||||
bool ReadLanguagePack(int lang_index)
|
bool ReadLanguagePack(int lang_index)
|
||||||
|
|
Loading…
Reference in New Issue