diff options
-rw-r--r-- | src/net_dedicated.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/net_dedicated.c b/src/net_dedicated.c index 77ad1a99..d67107b2 100644 --- a/src/net_dedicated.c +++ b/src/net_dedicated.c @@ -30,12 +30,48 @@ #include "i_system.h" #include "i_timer.h" +#include "m_argv.h" + #include "net_defs.h" #include "net_sdl.h" #include "net_server.h" +// +// People can become confused about how dedicated servers work. Game +// options are specified to the controlling player who is the first to +// join a game. Bomb out with an error message if game options are +// specified to a dedicated server. +// + +static char *not_dedicated_options[] = +{ + "-deh", "-iwad", "-cdrom", "-gameversion", "-nomonsters", "-respawn", + "-fast", "-altdeath", "-deathmatch", "-turbo", "-merge", "-af", "-as", + "-aa", "-file", "-wart", "-skill", "-episode", "-timer", "-avg", "-warp", + "-loadgame", "-longtics", "-extratics", "-dup", NULL, +}; + +static void CheckForClientOptions(void) +{ + int i; + + for (i=0; not_dedicated_options[i] != NULL; ++i) + { + if (M_CheckParm(not_dedicated_options[i]) > 0) + { + I_Error("The command line parameter '%s' was specified to a " + "dedicated server.\nGame parameters should be specified " + "to the first player to join a server, \nnot to the " + "server itself. ", + not_dedicated_options[i]); + } + } +} + void NET_DedicatedServer(void) { + CheckForClientOptions(); + NET_SV_Init(); NET_SV_AddModule(&net_sdl_module); |