summaryrefslogtreecommitdiff
path: root/setup/multiplayer.c
diff options
context:
space:
mode:
authorSimon Howard2007-06-18 23:50:42 +0000
committerSimon Howard2007-06-18 23:50:42 +0000
commit69789a1dbebea49b74ec336a848caaa83b501115 (patch)
tree2b0e3118286ebe8262918292c04b8a476eb82ac3 /setup/multiplayer.c
parentad6ea294fe35a98c76a2b75a757006fd67efab5a (diff)
downloadchocolate-doom-69789a1dbebea49b74ec336a848caaa83b501115.tar.gz
chocolate-doom-69789a1dbebea49b74ec336a848caaa83b501115.tar.bz2
chocolate-doom-69789a1dbebea49b74ec336a848caaa83b501115.zip
Add -iwad when joining a game, as well as when creating one (thanks
MikeRS :-) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 916
Diffstat (limited to 'setup/multiplayer.c')
-rw-r--r--setup/multiplayer.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/setup/multiplayer.c b/setup/multiplayer.c
index 062afae9..e06fa6ab 100644
--- a/setup/multiplayer.c
+++ b/setup/multiplayer.c
@@ -155,6 +155,14 @@ static void AddExtraParameters(execute_context_t *exec)
}
}
+static void AddIWADParameter(execute_context_t *exec)
+{
+ if (iwadfile != NULL)
+ {
+ AddCmdLineParameter(exec, "-iwad %s", iwadfile);
+ }
+}
+
static void StartGame(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(user_data))
{
execute_context_t *exec;
@@ -166,11 +174,7 @@ static void StartGame(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(user_data))
AddExtraParameters(exec);
- if (iwadfile != NULL)
- {
- AddCmdLineParameter(exec, "-iwad %s", iwadfile);
- }
-
+ AddIWADParameter(exec);
AddCmdLineParameter(exec, "-server");
AddCmdLineParameter(exec, "-skill %i", skill + 1);
@@ -555,7 +559,12 @@ static void DoJoinGame(void *unused1, void *unused2)
exec = NewExecuteContext();
AddCmdLineParameter(exec, "-connect %s", connect_address);
+
+ // Extra parameters come first, so that they can be used to override
+ // the other parameters.
+
AddExtraParameters(exec);
+ AddIWADParameter(exec);
AddWADs(exec);
TXT_Shutdown();