From 409e6051a48221cb2a02c182dc0d5e64f2eeb40f Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sun, 4 Jun 2006 22:17:32 +0000 Subject: * 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 --- src/client/cl_main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/client') 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 ); -- cgit