本文整理汇总了C++中Info_Print函数的典型用法代码示例。如果您正苦于以下问题:C++ Info_Print函数的具体用法?C++ Info_Print怎么用?C++ Info_Print使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Info_Print函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SV_Systeminfo_f
/*
===========
SV_Systeminfo_f
Examine or change the serverinfo string
===========
*/
static void SV_Systeminfo_f( void ) {
// make sure server is running
if ( !com_sv_running->integer ) {
Com_Printf( "Server is not running.\n" );
return;
}
Com_Printf ("System info settings:\n");
Info_Print ( Cvar_InfoString_Big( CVAR_SYSTEMINFO ) );
}
示例2: SV_User_f
//Examine a users info strings
void SV_User_f (void) {
if (Cmd_Argc() != 2) {
Com_Printf ("Usage: %s <userid>\n", Cmd_Argv(0));
return;
}
if (!SV_SetPlayer ())
return;
Info_Print (sv_client->userinfo);
}
示例3: SV_Systeminfo_f
/*
===========
SV_Systeminfo_f
Examine the systeminfo string
===========
*/
static void SV_Systeminfo_f( void )
{
// make sure server is running
if ( !com_sv_running->integer )
{
Com_Printf(_( "Server is not running.\n" ));
return;
}
Com_Printf(_( "System info settings:\n" ));
Info_Print( Cvar_InfoString( CVAR_SYSTEMINFO | CVAR_SERVERINFO_NOUPDATE, qfalse ) );
}
示例4: SV_User_f
void SV_User_f (void)
{
if (Cmd_Argc() != 2)
{
Con_Printf ("Usage: info <userid>\n");
return;
}
if (!SV_SetPlayer ())
return;
Info_Print (host_client->userinfo);
}
示例5: SV_Info_f
void SV_Info_f( void )
{
if (Cmd_Argc() != 2)
{
Con_Printf ("Usage: info <userid>\n");
return;
}
if ( !SV_SetPlayer(atoi(Cmd_Argv(1))) ) // sets the host_client
return;
Info_Print( host_client->userinfo );
}
示例6: SV_ClientInfo_f
/*
===========
SV_ClientInfo_f
Examine all a users info strings
===========
*/
void SV_ClientInfo_f( void )
{
if( Cmd_Argc() != 2 )
{
Msg( "Usage: clientinfo <userid>\n" );
return;
}
if( !SV_SetPlayer( )) return;
Msg( "userinfo\n" );
Msg( "--------\n" );
Info_Print( svs.currentPlayer->userinfo );
}
示例7: SV_DumpUser_f
/*
* =========== SV_DumpUser_f
*
* Examine all a users info strings ===========
*/
void
SV_DumpUser_f(void)
{
if (Cmd_Argc() != 2) {
Com_Printf("Usage: info <userid>\n");
return;
}
if (!SV_SetPlayer())
return;
Com_Printf("userinfo\n");
Com_Printf("--------\n");
Info_Print(sv_client->userinfo);
}
示例8: SV_DumpUser_f
/*
* SV_DumpUser_f
* Examine all a users info strings
*/
static void SV_DumpUser_f( void )
{
client_t *client;
if( Cmd_Argc() != 2 )
{
Com_Printf( "Usage: info <userid>\n" );
return;
}
client = SV_FindPlayer( Cmd_Argv( 1 ) );
if( !client )
return;
Com_Printf( "userinfo\n" );
Com_Printf( "--------\n" );
Info_Print( client->userinfo );
}
示例9: SV_ShowServerinfo_f
/*
==================
SV_ShowServerinfo_f
Dumps the serverinfo info string
==================
*/
void SV_ShowServerinfo_f(void){
cvar_t *cvar;
char line[MAX_STRING_CHARS];
if(!sv_client){ //print to server console
Info_Print(Cvar_Serverinfo());
return;
}
for(cvar = cvar_vars; cvar; cvar = cvar->next){
if(!(cvar->flags & CVAR_SERVERINFO))
continue; //only print serverinfo cvars
snprintf(line, MAX_STRING_CHARS, "%s %s\n", cvar->name, cvar->string);
SV_ClientPrintf(sv_client, PRINT_MEDIUM, line);
}
}
示例10: SV_Localinfo_f
//Examine or change the localinfo string
void SV_Localinfo_f (void) {
if (Cmd_Argc() == 1) {
Com_Printf ("Local info settings:\n");
Info_Print (localinfo);
return;
}
if (Cmd_Argc() != 3) {
Com_Printf ("Usage: localinfo [ <key> <value> ]\n");
return;
}
if (Cmd_Argv(1)[0] == '*') {
Com_Printf ("Star variables cannot be changed.\n");
return;
}
Info_SetValueForKey (localinfo, Cmd_Argv(1), Cmd_Argv(2), MAX_LOCALINFO_STRING);
}
示例11: SV_Serverinfo_f
/*
SV_Serverinfo_f
Examine or change the serverinfo string
*/
static void
SV_Serverinfo_f (void)
{
cvar_t *var;
const char *key;
const char *value;
switch (Cmd_Argc ()) {
case 1:
SV_Printf ("Server info settings:\n");
Info_Print (svs.info);
return;
case 2:
key = Cmd_Argv (1);
value = Info_ValueForKey (svs.info, key);
if (Info_Key (svs.info, key))
SV_Printf ("Server info %s: \"%s\"\n", key, value);
else
SV_Printf ("No such key %s\n", Cmd_Argv(1));
return;
case 3:
key = Cmd_Argv (1);
value = Cmd_Argv (2);
break;
default:
SV_Printf ("usage: serverinfo [ <key> <value> ]\n");
return;
}
if (Cmd_Argv (1)[0] == '*') {
SV_Printf ("Star variables cannot be changed.\n");
return;
}
// if this is a cvar, change it too
var = Cvar_FindVar (key);
if (var && (var->flags & CVAR_SERVERINFO)) {
Cvar_Set (var, value);
} else {
Info_SetValueForKey (svs.info, key, value, !sv_highchars->int_val);
SV_SendServerInfoChange (key, value);
}
}
示例12: SV_SetInfo_f
void SV_SetInfo_f (void)
{
int i;
char oldval[MAX_INFO_STRING];
if (Cmd_Argc() == 1)
{
Con_Printf ("User info settings:\n");
Info_Print (host_client->userinfo);
return;
}
if (Cmd_Argc() != 3)
{
Con_Printf ("usage: setinfo [ <key> <value> ]\n");
return;
}
if (Cmd_Argv(1)[0] == '*')
return; // don't set priveledged values
strcpy(oldval, Info_ValueForKey(host_client->userinfo, Cmd_Argv(1)));
Info_SetValueForKey (host_client->userinfo, Cmd_Argv(1), Cmd_Argv(2), MAX_INFO_STRING);
// name is extracted below in ExtractFromUserInfo
// strncpy (host_client->name, Info_ValueForKey (host_client->userinfo, "name")
// , sizeof(host_client->name)-1);
// SV_FullClientUpdate (host_client, &sv.reliable_datagram);
// host_client->sendinfo = true;
if (!strcmp(Info_ValueForKey(host_client->userinfo, Cmd_Argv(1)), oldval))
return; // key hasn't changed
// process any changed values
SV_ExtractFromUserinfo (host_client);
i = host_client - svs.clients;
MSG_WriteByte (&sv.reliable_datagram, svc_setinfo);
MSG_WriteByte (&sv.reliable_datagram, i);
MSG_WriteString (&sv.reliable_datagram, Cmd_Argv(1));
MSG_WriteString (&sv.reliable_datagram, Info_ValueForKey(host_client->userinfo, Cmd_Argv(1)));
}
示例13: GameStateParsed
void GameStateParsed( void ) {
int i;
char *configString;
for( i=0 ; i<MAX_CONFIGSTRINGS ; i++ ) {
configString = Com_GetStringFromGameState( &ds.gameState, i );
if( configString[0] ) {
if( i < RESERVED_CONFIGSTRINGS ) {
append_result( "%s_info:\n", (i == CS_SERVERINFO) ? "server" : "system" );
Info_Print( configString );
append_result( "\n" );
}/* else {
Com_Printf( "configString %i: \"%s\"\n", i, configString );
}*/
}
}
for( i=0 ; i<MAX_CLIENTS ; i++ ) {
configString = Com_GetStringFromGameState( &ds.gameState, CS_PLAYERS + i );
UpdateClientInfo( i, configString );
}
}
示例14: SV_DumpUser_f
/*
===========
SV_DumpUser_f
Examine all a users info strings FIXME: move to game
===========
*/
static void SV_DumpUser_f( void ) {
client_t *cl;
// make sure server is running
if ( !com_sv_running->integer ) {
Com_Printf( "Server is not running.\n" );
return;
}
if ( Cmd_Argc() != 2 ) {
Com_Printf ("Usage: info <userid>\n");
return;
}
cl = SV_GetPlayerByHandle();
if ( !cl ) {
return;
}
Com_Printf( "userinfo\n" );
Com_Printf( "--------\n" );
Info_Print( cl->userinfo );
}
示例15: SV_DumpUser_f
/*
===========
SV_DumpUser_f
Examine all a users info strings
===========
*/
static void SV_DumpUser_f( void ) {
player_t *player;
// make sure server is running
if ( !com_sv_running->integer ) {
Com_Printf( "Server is not running.\n" );
return;
}
if ( Cmd_Argc() != 2 ) {
Com_Printf ("Usage: dumpuser <userid>\n");
return;
}
player = SV_GetPlayerByHandle();
if ( !player ) {
return;
}
Com_Printf( "userinfo\n" );
Com_Printf( "--------\n" );
Info_Print( player->userinfo );
}