mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-22 03:51:40 +00:00
Merge pull request #82 from petr666/master
Generate random suffix for default player name
This commit is contained in:
commit
8cf2ffc445
1 changed files with 6 additions and 1 deletions
|
@ -3622,7 +3622,12 @@ void CL_Init( void ) {
|
||||||
cl_consoleKeys = Cvar_Get( "cl_consoleKeys", "~ ` 0x7e 0x60", CVAR_ARCHIVE);
|
cl_consoleKeys = Cvar_Get( "cl_consoleKeys", "~ ` 0x7e 0x60", CVAR_ARCHIVE);
|
||||||
|
|
||||||
// userinfo
|
// userinfo
|
||||||
Cvar_Get ("name", "[VR] Player", CVAR_USERINFO | CVAR_ARCHIVE );
|
char playerName[256];
|
||||||
|
Com_sprintf(playerName, 256, "[VR] Player#%i", rand() % (99999999 - 10000000) + 10000000);
|
||||||
|
Cvar_Get ("name", playerName, CVAR_USERINFO | CVAR_ARCHIVE );
|
||||||
|
if (strcmp(Cvar_VariableString("name"), "[VR] Player") == 0) {
|
||||||
|
Cvar_Set( "name", playerName);
|
||||||
|
}
|
||||||
cl_rate = Cvar_Get ("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE );
|
cl_rate = Cvar_Get ("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE );
|
||||||
Cvar_Get ("snaps", "40", CVAR_USERINFO | CVAR_ARCHIVE );
|
Cvar_Get ("snaps", "40", CVAR_USERINFO | CVAR_ARCHIVE );
|
||||||
Cvar_Get ("model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE );
|
Cvar_Get ("model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE );
|
||||||
|
|
Loading…
Reference in a new issue