summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/cl_main.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index af8c1d76..6e0cdaff 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -2352,6 +2352,8 @@ CL_Init
====================
*/
void CL_Init( void ) {
+ const char *playerName;
+
Com_Printf( "----- Client Initialization -----\n" );
Con_Init ();
@@ -2436,7 +2438,17 @@ void CL_Init( void ) {
// userinfo
- Cvar_Get ("name", "UnnamedPlayer", CVAR_USERINFO | CVAR_ARCHIVE );
+ playerName = getenv( "USER" ); // Unixy stuff
+ if( playerName == NULL )
+ {
+ playerName = getenv( "USERNAME" ); // Windows
+ if( playerName == NULL )
+ {
+ playerName = "Newbie"; // Default
+ }
+ }
+ Cvar_Get ("name", playerName, CVAR_USERINFO | CVAR_ARCHIVE );
+
Cvar_Get ("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE );