shithub: choc

Download patch

ref: 4a31b4fbbaaf716b45403698e8c0b5dd523d0f47
parent: dce196fc67de283c41269b95a5d14c5a6616f32f
author: Simon Howard <[email protected]>
date: Tue Oct 24 15:50:00 EDT 2006

Fix player name option in setup tool.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 730

--- 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"
--- a/setup/multiplayer.c
+++ b/setup/multiplayer.c
@@ -56,7 +56,7 @@
     "Deathmatch 2.0",
 };
 
-char *player_name;
+char *net_player_name;
 char *chat_macros[10];
 
 static char *wads[NUM_WADS] = {};
@@ -464,19 +464,19 @@
 
 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 @@
     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"),
--- 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);