diff options
-rw-r--r-- | man/chocolate-server.6 | 6 | ||||
-rw-r--r-- | setup/multiplayer.c | 22 |
2 files changed, 23 insertions, 5 deletions
diff --git a/man/chocolate-server.6 b/man/chocolate-server.6 index 65d0a3fe..f37173f2 100644 --- a/man/chocolate-server.6 +++ b/man/chocolate-server.6 @@ -29,6 +29,12 @@ mean the netgame will simply not function at all. .TP \fB-port <n>\fR Use the specified UDP port for communications, instead of the default (2342). +.TP +\fB-privateserver\fR +Don't register with the global master server. +.TP +\fB-servername <name>\fR +Specify a name for the server. .SH SEE ALSO \fBchocolate-doom\fR(6), \fBchocolate-setup\fR(6) diff --git a/setup/multiplayer.c b/setup/multiplayer.c index dfd9e3ba..95453f8f 100644 --- a/setup/multiplayer.c +++ b/setup/multiplayer.c @@ -115,6 +115,7 @@ static int fast = 0; static int respawn = 0; static int udpport = 2342; static int timer = 0; +static int privateserver = 0; static txt_dropdown_list_t *skillbutton; static txt_button_t *warpbutton; @@ -252,6 +253,11 @@ static void StartGame(int multiplayer) { AddCmdLineParameter(exec, "-timer %i", timer); } + + if (privateserver) + { + AddCmdLineParameter(exec, "-privateserver"); + } } AddWADs(exec); @@ -611,14 +617,12 @@ static void StartGameMenu(char *window_title, int multiplayer) TXT_NewCheckBox("Respawning monsters", &respawn), TXT_NewSeparator("Advanced"), advanced_table = TXT_NewTable(2), - TXT_NewButton2("Add extra parameters...", - OpenExtraParamsWindow, NULL), NULL); TXT_SetWindowAction(window, TXT_HORIZ_CENTER, WadWindowAction()); TXT_SetWindowAction(window, TXT_HORIZ_RIGHT, StartGameAction(multiplayer)); - TXT_SetColumnWidths(gameopt_table, 12, 12); + TXT_SetColumnWidths(gameopt_table, 12, 6); TXT_AddWidgets(gameopt_table, TXT_NewLabel("Game"), @@ -640,13 +644,21 @@ static void StartGameMenu(char *window_title, int multiplayer) NULL), NULL); - TXT_AddWidgets(advanced_table, + TXT_AddWidget(window, + TXT_NewInvertedCheckBox("Register with master server", + &privateserver)); + + TXT_AddWidgets(advanced_table, TXT_NewLabel("UDP port"), TXT_NewIntInputBox(&udpport, 5), NULL); } - TXT_SetColumnWidths(advanced_table, 12, 12); + TXT_AddWidget(window, + TXT_NewButton2("Add extra parameters...", + OpenExtraParamsWindow, NULL)); + + TXT_SetColumnWidths(advanced_table, 12, 6); TXT_SignalConnect(iwad_selector, "changed", UpdateWarpType, NULL); |