diff options
author | dominik <dominik@openttd.org> | 2004-08-22 10:23:37 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-08-22 10:23:37 +0000 |
commit | 0bd907e88df535a11483b5bdcb5763a5fce0cbf5 (patch) | |
tree | ba05804e536e0dfe9e8f04ff59eca4cecbea04e5 /intro_gui.c | |
parent | b2340212c393d2488b8554dccafb9ab56e00dee5 (diff) | |
download | openttd-0bd907e88df535a11483b5bdcb5763a5fce0cbf5.tar.xz |
(svn r106) New network core (by sign_de)
Features:
* network core is dynamicly loaded when needed (-n isn't needed anymore)
for easy switching between single and multiplayer. But commandline
shortcuts are still enabled:
-n = autodetect network server
-n [ip] = connect to the server
* udp now uses 2 different ports
- you can run 1 server and serveral clients on one pc
- the clients udp-socket gets unloaded when the
network game starts
- the servers udp-sockets remains online to allow the
network gui to detect itself
* new gameinfo structure
this struct is available for every online/lan game
* dynamic NetworkGameList
Diffstat (limited to 'intro_gui.c')
-rw-r--r-- | intro_gui.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intro_gui.c b/intro_gui.c index b1095691e..83cb5a043 100644 --- a/intro_gui.c +++ b/intro_gui.c @@ -58,7 +58,9 @@ static void SelectGameWndProc(Window *w, WindowEvent *e) { DoCommandP(0, 0, 0, NULL, CMD_SET_SINGLE_PLAYER); break; case 7: - ShowNetworkGameWindow(); + if (!_network_available) { + ShowErrorMessage(-1,STR_NETWORK_ERR_NOTAVAILABLE, 0, 0); + } else ShowNetworkGameWindow(); break; case 8: ShowGameOptions(); break; case 9: ShowGameDifficulty(); break; @@ -118,7 +120,7 @@ int32 CmdGenRandomNewGame(int x, int y, uint32 flags, uint32 p1, uint32 p2) _random_seed_1 = p1; _random_seed_2 = p2; - if (_networking) { NetworkStartSync(); } + if (_networking) { NetworkStartSync(true); } MakeNewGame(); return 0; @@ -159,7 +161,7 @@ int32 CmdStartScenario(int x, int y, uint32 flags, uint32 p1, uint32 p2) _random_seed_1 = p1; _random_seed_2 = p2; - if (_networking) { NetworkStartSync(); } + if (_networking) { NetworkStartSync(true); } StartScenario(); return 0; |