diff options
author | Simon Howard | 2009-05-14 19:54:49 +0000 |
---|---|---|
committer | Simon Howard | 2009-05-14 19:54:49 +0000 |
commit | 9eb11191b5ac68764da60c2f583d9c34ac05794e (patch) | |
tree | 4c1909025b51956006cbab44849d279a17031ebd /src | |
parent | 664c35903202a2e7c56479eff1786e952718e4df (diff) | |
download | chocolate-doom-9eb11191b5ac68764da60c2f583d9c34ac05794e.tar.gz chocolate-doom-9eb11191b5ac68764da60c2f583d9c34ac05794e.tar.bz2 chocolate-doom-9eb11191b5ac68764da60c2f583d9c34ac05794e.zip |
Add character class selectors for Hexen.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1523
Diffstat (limited to 'src')
-rw-r--r-- | src/setup/multiplayer.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/src/setup/multiplayer.c b/src/setup/multiplayer.c index 6756e53c..101361c4 100644 --- a/src/setup/multiplayer.c +++ b/src/setup/multiplayer.c @@ -103,6 +103,13 @@ static char *hexen_skills[] = "Titan/Pope/Archimage" }; +static char *character_classes[] = +{ + "Fighter", + "Cleric", + "Mage" +}; + static struct { GameMission_t mission; @@ -114,7 +121,7 @@ static struct { hexen, hexen_skills } }; -static char *gamemodes[] = +static char *gamemodes[] = { "Co-operative", "Deathmatch", @@ -128,6 +135,7 @@ static int jointype = JOIN_ADDRESS; static char *wads[NUM_WADS]; static char *extra_params[NUM_EXTRA_PARAMS]; +static int character_class = 0; static int skill = 2; static int nomonsters = 0; static int deathmatch = 0; @@ -215,6 +223,11 @@ static void StartGame(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(user_data)) AddCmdLineParameter(exec, "-server"); AddCmdLineParameter(exec, "-skill %i", skill + 1); + if (gamemission == hexen) + { + AddCmdLineParameter(exec, "-class %i", character_class); + } + if (nomonsters) { AddCmdLineParameter(exec, "-nomonsters"); @@ -618,6 +631,15 @@ void StartMultiGame(void) NULL), NULL); + if (gamemission == hexen) + { + TXT_AddWidgets(gameopt_table, + TXT_NewLabel("Character class "), + TXT_NewDropdownList(&character_class, + character_classes, 3), + NULL); + } + TXT_SetColumnWidths(advanced_table, 12, 12); TXT_SignalConnect(iwad_selector, "changed", UpdateWarpType, NULL); @@ -646,6 +668,11 @@ static void DoJoinGame(void *unused1, void *unused2) AddCmdLineParameter(exec, "-autojoin"); } + if (gamemission == hexen) + { + AddCmdLineParameter(exec, "-class %i", character_class); + } + // Extra parameters come first, so that they can be used to override // the other parameters. @@ -705,6 +732,15 @@ void JoinMultiGame(void) IWADSelector(), NULL); + if (gamemission == hexen) + { + TXT_AddWidgets(gameopt_table, + TXT_NewLabel("Character class "), + TXT_NewDropdownList(&character_class, + character_classes, 3), + NULL); + } + TXT_AddWidgets(serveropt_table, TXT_NewRadioButton("Connect to address:", &jointype, JOIN_ADDRESS), |