ref: 434f95234083ef9a08cc39c3f3906a969ba18725
parent: 80fbe1a1d2fc32d13082a816a5521660318b0101
author: Simon Howard <[email protected]>
date: Sat Oct 29 20:26:32 EDT 2011
Fix previous change - Strife games are not always -altdeath; the default is -deathmatch and -altdeath enables Deathmatch II mode. Subversion-branch: /branches/v2-branch Subversion-revision: 2471
--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@ -128,6 +128,12 @@
"Deathmatch 2.0",
};
+static char *strife_gamemodes[] =
+{
+ "Normal deathmatch",
+ "Items respawn", // (altdeath)
+};
+
static char *net_player_name;
static char *chat_macros[10];
@@ -137,6 +143,7 @@
static int skill = 2;
static int nomonsters = 0;
static int deathmatch = 0;
+static int strife_altdeath = 0;
static int fast = 0;
static int respawn = 0;
static int udpport = 2342;
@@ -269,7 +276,7 @@
{
AddCmdLineParameter(exec, "-deathmatch");
}
- else if (deathmatch == 2)
+ else if (deathmatch == 2 || strife_altdeath != 0)
{
AddCmdLineParameter(exec, "-altdeath");
}
@@ -631,6 +638,29 @@
return action;
}
+static txt_dropdown_list_t *GameTypeDropdown(void)
+{
+ switch (gamemission)
+ {
+ case doom:
+ default:
+ return TXT_NewDropdownList(&deathmatch, gamemodes, 3);
+
+ // Heretic and Hexen don't support Deathmatch II:
+
+ case heretic:
+ case hexen:
+ return TXT_NewDropdownList(&deathmatch, gamemodes, 2);
+
+ // Strife supports both deathmatch modes, but doesn't support
+ // multiplayer co-op. Use a different variable to indicate whether
+ // to use altdeath or not.
+
+ case strife:
+ return TXT_NewDropdownList(&strife_altdeath, strife_gamemodes, 2);
+ }
+}
+
// "Start game" menu. This is used for the start server window
// and the single player warp menu. The parameters specify
// the window title and whether to display multiplayer options.
@@ -641,7 +671,6 @@
txt_table_t *gameopt_table;
txt_table_t *advanced_table;
txt_widget_t *iwad_selector;
- int num_mult_types = 2;
window = TXT_NewWindow(window_title);
@@ -660,15 +689,6 @@
TXT_SetColumnWidths(gameopt_table, 12, 6);
- if (gamemission == doom)
- {
- num_mult_types = 3;
- }
- else
- {
- num_mult_types = 2;
- }
-
TXT_AddWidgets(gameopt_table,
TXT_NewLabel("Game"),
iwad_selector = IWADSelector(),
@@ -689,15 +709,9 @@
if (multiplayer)
{
- if (gamemission != strife)
- {
- TXT_AddWidgets(gameopt_table,
- TXT_NewLabel("Game type"),
- TXT_NewDropdownList(&deathmatch, gamemodes, num_mult_types),
- NULL);
- }
-
TXT_AddWidgets(gameopt_table,
+ TXT_NewLabel("Game type"),
+ GameTypeDropdown(),
TXT_NewLabel("Time limit"),
TXT_NewHorizBox(TXT_NewIntInputBox(&timer, 2),
TXT_NewLabel("minutes"),
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1507,9 +1507,9 @@
if(devparm)
showintro = false;
- // Note: Strife *only* supports -altdeath mode. Vanilla
- // Strife does not understand the -deathmatch command
- // line parameter.
+ // Note: Vanilla Strife does not understand the -deathmatch command
+ // line parameter. deathmatch=1 is the default behavior when
+ // playing a netgame.
//!
// @category net
--- a/src/strife/d_net.c
+++ b/src/strife/d_net.c
@@ -278,12 +278,12 @@
LoadGameSettings(&settings, &connect_data);
- // Strife netgames are *always* deathmatch,
- // specifically altdeath mode.
+ // Strife games are always deathmatch, though -altdeath is
+ // supported for respawning items.
- if (netgame)
+ if (netgame && deathmatch == 0)
{
- deathmatch = 2;
+ deathmatch = 1;
}
DEH_printf("startmap: %i, skill: %i, enemies: %i, random: %i\n",