diff options
author | Tim Angus <tim@ngus.net> | 2006-06-04 22:17:32 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2006-06-04 22:17:32 +0000 |
commit | 409e6051a48221cb2a02c182dc0d5e64f2eeb40f (patch) | |
tree | bc21ff57ac201d2e7316a23aabb7aeb24902d2de /src/client/cl_main.c | |
parent | db12d262430a58bae27e2b1ece3f07215a1083d2 (diff) |
* Added target_hurt
* Various other map entity fixes/enhancements
* Hovel exploit fixed
* Fixed tesla trail disappearing at edge of range
* Default player name now inherited from OS
* Fixed spelling of Veda's surname :x
Diffstat (limited to 'src/client/cl_main.c')
-rw-r--r-- | src/client/cl_main.c | 14 |
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 ); |