diff options
author | Simon Howard | 2006-10-24 19:50:00 +0000 |
---|---|---|
committer | Simon Howard | 2006-10-24 19:50:00 +0000 |
commit | 4a31b4fbbaaf716b45403698e8c0b5dd523d0f47 (patch) | |
tree | 0a79b1a19f9476f6c473d137e83df1bac0526f2b | |
parent | dce196fc67de283c41269b95a5d14c5a6616f32f (diff) | |
download | chocolate-doom-4a31b4fbbaaf716b45403698e8c0b5dd523d0f47.tar.gz chocolate-doom-4a31b4fbbaaf716b45403698e8c0b5dd523d0f47.tar.bz2 chocolate-doom-4a31b4fbbaaf716b45403698e8c0b5dd523d0f47.zip |
Fix player name option in setup tool.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 730
-rw-r--r-- | setup/configfile.c | 3 | ||||
-rw-r--r-- | setup/multiplayer.c | 16 | ||||
-rw-r--r-- | setup/multiplayer.h | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/setup/configfile.c b/setup/configfile.c index f37eb40c..1775ade4 100644 --- a/setup/configfile.c +++ b/setup/configfile.c @@ -41,7 +41,10 @@ #endif #include "config.h" + +#include "doomfeatures.h" #include "doomkeys.h" + #include "m_argv.h" #include "compatibility.h" diff --git a/setup/multiplayer.c b/setup/multiplayer.c index d4a5256d..9980cd34 100644 --- a/setup/multiplayer.c +++ b/setup/multiplayer.c @@ -56,7 +56,7 @@ static char *gamemodes[] = "Deathmatch 2.0", }; -char *player_name; +char *net_player_name; char *chat_macros[10]; static char *wads[NUM_WADS] = {}; @@ -464,19 +464,19 @@ void SetChatMacroDefaults(void) void SetPlayerNameDefault(void) { - if (player_name == NULL) + if (net_player_name == NULL) { - player_name = getenv("USER"); + net_player_name = getenv("USER"); } - if (player_name == NULL) + if (net_player_name == NULL) { - player_name = getenv("USERNAME"); + net_player_name = getenv("USERNAME"); } - if (player_name == NULL) + if (net_player_name == NULL) { - player_name = "player"; + net_player_name = "player"; } } @@ -493,7 +493,7 @@ void MultiplayerConfig(void) TXT_AddWidgets(window, TXT_NewStrut(0, 1), TXT_NewHorizBox(TXT_NewLabel("Player name: "), - TXT_NewInputBox(&player_name, 25), + TXT_NewInputBox(&net_player_name, 25), NULL), TXT_NewStrut(0, 1), TXT_NewSeparator("Chat macros"), diff --git a/setup/multiplayer.h b/setup/multiplayer.h index be35bd08..b9871ed5 100644 --- a/setup/multiplayer.h +++ b/setup/multiplayer.h @@ -22,7 +22,7 @@ #ifndef SETUP_MULTIPLAYER_H #define SETUP_MULTIPLAYER_H -extern char *player_name; +extern char *net_player_name; extern char *chat_macros[10]; void StartMultiGame(void); |