projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added separate network info structure for network options and setup values
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index 88ffc38bfca24941a3a051b2381723b2567f1078..8dec027785859377910914d56630c8a05aeeadd9 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-5605,16
+5605,22
@@
static void InitArtworkDone()
InitGlobalAnimations();
}
InitGlobalAnimations();
}
-void InitNetworkSe
rver
()
+void InitNetworkSe
ttings
()
{
{
- if (setup.network_mode)
- options.network = TRUE;
+ InitNetworkInfo(options.network || setup.network_mode,
+ FALSE,
+ options.serveronly,
+ options.server_host,
+ options.server_port);
+}
- if (!options.network)
+void InitNetworkServer()
+{
+ if (!network.enabled)
return;
#if defined(NETWORK_AVALIABLE)
return;
#if defined(NETWORK_AVALIABLE)
- if (!ConnectToServer(
options.server_host, options
.server_port))
+ if (!ConnectToServer(
network.server_host, network
.server_port))
Error(ERR_EXIT, "cannot connect to network game server");
SendToServer_PlayerName(setup.player_name);
Error(ERR_EXIT, "cannot connect to network game server");
SendToServer_PlayerName(setup.player_name);
@@
-5993,10
+5999,12
@@
void OpenAll()
if (options.execute_command)
Execute_Command(options.execute_command);
if (options.execute_command)
Execute_Command(options.execute_command);
- if (options.serveronly)
+ InitNetworkSettings();
+
+ if (network.serveronly)
{
#if defined(PLATFORM_UNIX)
{
#if defined(PLATFORM_UNIX)
- NetworkServer(
options.server_port, options.serveronly
);
+ NetworkServer(
network.server_port, TRUE
);
#else
Error(ERR_WARN, "networking only supported in Unix version");
#endif
#else
Error(ERR_WARN, "networking only supported in Unix version");
#endif