diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index f864ac16..737e9457 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -3095,3 +3095,15 @@ void CL_LegacyPrecache_f( void ) MSG_WriteString( &cls.netchan.message, va( "begin %i", spawncount )); cls.signon = SIGNONS; } + +void CL_LegacyUpdateInfo( void ) +{ + if( !cls.legacymode ) + return; + + if( cls.state != ca_active ) + return; + + MSG_BeginClientCmd( &cls.netchan.message, clc_legacy_userinfo ); + MSG_WriteString( &cls.netchan.message, cls.userinfo ); +} diff --git a/engine/common/common.h b/engine/common/common.h index 301b140a..c0a60d3b 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -975,6 +975,7 @@ qboolean CL_IsThirdPerson( void ); qboolean CL_IsIntermission( void ); qboolean CL_Initialized( void ); char *CL_Userinfo( void ); +void CL_LegacyUpdateInfo( void ); void CL_CharEvent( int key ); qboolean CL_DisableVisibility( void ); int CL_PointContents( const vec3_t point ); diff --git a/engine/common/cvar.c b/engine/common/cvar.c index 39c63de9..ab0e4562 100644 --- a/engine/common/cvar.c +++ b/engine/common/cvar.c @@ -121,6 +121,7 @@ static qboolean Cvar_UpdateInfo( convar_t *var, const char *value, qboolean noti // time to update server copy of userinfo CL_ServerCommand( true, "setinfo \"%s\" \"%s\"\n", var->name, value ); + CL_LegacyUpdateInfo(); } #endif } diff --git a/engine/common/protocol.h b/engine/common/protocol.h index 6564b571..d9c6486e 100644 --- a/engine/common/protocol.h +++ b/engine/common/protocol.h @@ -253,6 +253,8 @@ extern const char *clc_strings[clc_lastmsg+1]; #define svc_legacy_event 27 // playback event queue #define svc_legacy_changing 3 // changelevel by server request +#define clc_legacy_userinfo 6 // [[userinfo string] + #define SND_LEGACY_LARGE_INDEX (1<<2) // a send sound as short #define MAX_LEGACY_ENTITY_BITS 12 #define MAX_LEGACY_WEAPON_BITS 5