• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Cbuf_InsertText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Cbuf_InsertText函数的典型用法代码示例。如果您正苦于以下问题:C++ Cbuf_InsertText函数的具体用法?C++ Cbuf_InsertText怎么用?C++ Cbuf_InsertText使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Cbuf_InsertText函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Cmd_Vstr_f

/*
===============
Cmd_Vstr_f

Inserts the current value of a variable as command text
===============
*/
void Cmd_Vstr_f( void ) {
	char	*v;

	if (Cmd_Argc () != 2) {
		Com_Printf ("vstr <variablename> : execute a variable command\n");
		return;
	}

	v = Cvar_VariableString( Cmd_Argv( 1 ) );
	Cbuf_InsertText( va("%s\n", v ) );
}
开发者ID:northWind87,项目名称:quake3cs133,代码行数:18,代码来源:cmd.c


示例2: Cmd_ExecuteString

/*
============
Cmd_ExecuteString

A complete command line has been parsed, so try to execute it
FIXME: lookupnoadd the token to speed search?
============
*/
void Cmd_ExecuteString(const char * text)
{
    extern void Cmd_ForwardToServer(void);

    cmd_function_t * cmd;
    cmdalias_t * a;

    Cmd_TokenizeString(text, true);

    // execute the command line
    if (!Cmd_Argc())
        return; // no tokens

    // check functions
    for (cmd = cmd_functions; cmd; cmd = cmd->next)
    {
        if (!Q_strcasecmp(cmd_argv[0], cmd->name))
        {
            if (!cmd->function)
            {
                // forward to server command
                Cmd_ExecuteString(va("cmd %s", text));
            }
            else
            {
                cmd->function();
            }
            return;
        }
    }

    // check alias
    for (a = cmd_alias; a; a = a->next)
    {
        if (!Q_strcasecmp(cmd_argv[0], a->name))
        {
            if (++alias_count == ALIAS_LOOP_COUNT)
            {
                Com_Printf("ALIAS_LOOP_COUNT\n");
                return;
            }
            Cbuf_InsertText(a->value);
            return;
        }
    }

    // check cvars
    if (Cvar_Command())
        return;

    // send it as a server command if we are connected
    Cmd_ForwardToServer();
}
开发者ID:glampert,项目名称:quake2-for-ps2,代码行数:61,代码来源:cmd.c


示例3: Cmd_ExecuteString

/*
============
Cmd_ExecuteString

A complete command line has been parsed, so try to execute it
============
*/
void Cmd_ExecuteString( char *text, cmd_source_t src )
{	
	qboolean		isServerCommand = false;
	qboolean		isDLLCommand = false;
	cmd_function_t	*cmd;
	cmdalias_t	*a;

	// set cmd source
	cmd_source = src;
	
	// execute the command line
	Cmd_TokenizeString( text );		

	if( !Cmd_Argc()) return; // no tokens

	// check alias
	for( a = cmd_alias; a; a = a->next )
	{
		if( !Q_stricmp( cmd_argv[0], a->name ))
		{
			Cbuf_InsertText( a->value );
			return;
		}
	}

	// check functions
	for( cmd = cmd_functions; cmd; cmd = cmd->next )
	{
		if( cmd && !Q_stricmp( cmd_argv[0], cmd->name ) && cmd->function )
		{
			cmd->function();
			return;
		}
	}

	// check cvars
	if( Cvar_Command( )) return;

	// forward the command line to the server, so the entity DLL can parse it
	if( cmd_source == src_command && host.type == HOST_NORMAL )
	{
		if( cls.state >= ca_connected )
		{
			Cmd_ForwardToServer();
			return;
		}
	}
	else if( text[0] != '@' && host.type == HOST_NORMAL )
	{
		// commands with leading '@' are hidden system commands
		MsgDev( D_INFO, "Unknown command \"%s\"\n", text );
	}
}
开发者ID:bmk10,项目名称:sing-engine,代码行数:60,代码来源:cmd.c


示例4: Cmd_ExecuteString

/**
 * @brief A complete command line has been parsed, so try to execute it
 * @todo lookupnoadd the token to speed search?
 */
void Cmd_ExecuteString (const char *text)
{
	const cmd_function_t *cmd;
	const cmd_alias_t *a;
	const char *str;
	unsigned int hash;

	Com_DPrintf(DEBUG_COMMANDS, "ExecuteString: '%s'\n", text);

	Cmd_TokenizeString(text, qtrue);

	/* execute the command line */
	if (!Cmd_Argc())
		/* no tokens */
		return;

	str = Cmd_Argv(0);

	/* check functions */
	hash = Com_HashKey(str, CMD_HASH_SIZE);
	for (cmd = cmd_functions_hash[hash]; cmd; cmd = cmd->hash_next) {
		if (!Q_strcasecmp(str, cmd->name)) {
			if (!cmd->function) {	/* forward to server command */
				Cmd_ExecuteString(va("cmd %s", text));
			} else {
				cmd_userdata = cmd->userdata;
				cmd->function();
			}
			return;
		}
	}

	/* check alias */
	hash = Com_HashKey(str, ALIAS_HASH_SIZE);
	for (a = cmd_alias_hash[hash]; a; a = a->hash_next) {
		if (!Q_strcasecmp(str, a->name)) {
			if (++alias_count == ALIAS_LOOP_COUNT) {
				Com_Printf("ALIAS_LOOP_COUNT\n");
				return;
			}
			Cbuf_InsertText(a->value);
			return;
		}
	}

	/* check cvars */
	if (Cvar_Command())
		return;

	/* send it as a server command if we are connected */
	Cmd_ForwardToServer();
}
开发者ID:chrisglass,项目名称:ufoai,代码行数:56,代码来源:cmd.c


示例5: Cmd_Vstr_f

/*
===============
Cmd_Vstr_f

Inserts the current value of a variable as command text
===============
*/
void Cmd_Vstr_f( void ) {
	char	*v;
	char	buf[MAX_STRING_CHARS];
	
	if (Cmd_Argc () != 2) {
		Com_Printf ("vstr <variablename> : execute a variable command\n");
		return;
	}

	v = Cvar_VariableString( Cmd_Argv( 1 ) );
	Com_sprintf(buf, sizeof(buf), "%s", v);
	Cbuf_InsertText( buf );
}
开发者ID:BraXi,项目名称:CoD4X18-Server,代码行数:20,代码来源:cmd.c


示例6: Cmd_If_f

/*
===============
Cmd_If_f

Compares two values, if true executes the third argument, if false executes the forth
===============
*/
void Cmd_If_f( void ) {
	char	*v;
	int 	v1;
	int 	v2;
	char	*vt;
	char	*vf;
	char  *op;

	if ( (Cmd_Argc () == 6 ) || (Cmd_Argc () == 5) ) {
		v1 = atoi( Cmd_Argv( 1 ) );
		op = Cmd_Argv( 2 );
		v2 = atoi( Cmd_Argv( 3 ) );
		vt = Cmd_Argv( 4 );
		if ( ( !strcmp( op, "="  ) && v1 == v2 ) ||
			( !strcmp( op, "!=" ) && v1 != v2 ) ||
			( !strcmp( op, "<"  ) && v1 <  v2 ) ||
			( !strcmp( op, "<=" ) && v1 <= v2 ) ||
			( !strcmp( op, ">"  ) && v1 >  v2 ) ||
			( !strcmp( op, ">=" ) && v1 >= v2 ) )
		{
			v = vt;
		}
		else if ( ( !strcmp( op, "="  ) && v1 != v2 ) ||
			( !strcmp( op, "!=" ) && v1 == v2 ) ||
			( !strcmp( op, "<"  ) && v1 >= v2 ) ||
			( !strcmp( op, "<=" ) && v1 >  v2 ) ||
			( !strcmp( op, ">"  ) && v1 <= v2 ) ||
			( !strcmp( op, ">=" ) && v1 <  v2 ) )
		{
			if ( Cmd_Argc () == 6 ) 
			{
				vf = Cmd_Argv( 5 );
				v = vf;
			}
			else
			{
				return;
			}
		}
		else
		{
			Com_Printf ("invalid operator in if command. valid operators are = != < > >= <=\n");
			return;
		}
	}
	else {
		Com_Printf ("if <value1> <operator> <value2> <cmdthen> (<cmdelse>) : compares the first two values and executes <cmdthen> if true, <cmdelse> if false\n");
		return;
	}
	Cbuf_InsertText( va("vstr %s\n", v ) );
}
开发者ID:shawnd,项目名称:urt-bumpy-engine,代码行数:58,代码来源:cmd.c


示例7: Cmd_Vstr_f

/*
===============
Cmd_Vstr_f

Inserts the current value of a variable as command text
===============
*/
void Cmd_Vstr_f( void ) {
	const char	*v;
	char	buf[MAX_CMD_LINE];
	char c_str[1024];

	if (Cmd_Argc () != 2) {
		Com_Printf ("vstr <variablename> : execute a variable command\n");
		return;
	}

	v = Cvar_VariableStringBuffer( Cmd_Argv( 1 ), c_str, sizeof(c_str) );
	Com_sprintf(buf, sizeof(buf), "%s", v);
	Cbuf_InsertText( buf );
}
开发者ID:D4edalus,项目名称:CoD4x_Server,代码行数:21,代码来源:cmd.c


示例8: Host_Exec_f

/*
===============
Host_Exec_f
===============
*/
void Host_Exec_f( void )
{
	string	cfgpath;
	char	*f;

	if( Cmd_Argc() != 2 )
	{
		Msg( "Usage: exec <filename>\n" );
		return;
	}

	// HACKHACK: don't execute listenserver.cfg in singleplayer
	if( !Q_stricmp( Cvar_VariableString( "lservercfgfile" ),  Cmd_Argv( 1 )))
	{
		if( Cvar_VariableValue( "maxplayers" ) == 1.0f )
			return;
	}

	Q_strncpy( cfgpath, Cmd_Argv( 1 ), sizeof( cfgpath )); 
	FS_DefaultExtension( cfgpath, ".cfg" ); // append as default

	f = (char *)FS_LoadFile( cfgpath, NULL, false );
	if( !f )
	{
		MsgDev( D_NOTE, "couldn't exec %s\n", Cmd_Argv( 1 ));
		return;
	}

	MsgDev( D_INFO, "execing %s\n", Cmd_Argv( 1 ));

	// terminate the string with newline just in case it's missing
	// insertion order is backwards from execution order
	Cbuf_InsertText( "\n" );
	Cbuf_InsertText( f );
	Mem_Free( f );
}
开发者ID:ptitSeb,项目名称:xash3d,代码行数:41,代码来源:host.c


示例9: Cmd_Runalias_f

static void
Cmd_Runalias_f (void)
{
	cmdalias_t *a;

	a = (cmdalias_t *) Hash_Find (cmd_alias_hash, Cmd_Argv (0));

	if (a) {
		Cbuf_InsertText (cbuf_active, a->value);
		return;
	} else {
		Sys_Printf
			("BUG: No alias found for registered command.  Please report this to the QuakeForge development team.");
	}
}
开发者ID:EIREXE,项目名称:Quakeforge-gcw0,代码行数:15,代码来源:cmd.c


示例10: Cmd_ExecuteString

/*
============
Cmd_ExecuteString

A complete command line has been parsed, so try to execute it
FIXME: lookupnoadd the token to speed search?
============
*/
void	Cmd_ExecuteString (char *text)
{	
	cmd_function_t	*cmd;
	cmdalias_t		*a;

	Cmd_TokenizeString (text);
			
// execute the command line
	if (!Cmd_Argc())
		return;		// no tokens

// check functions
	for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
	{
		if (!Q_strcasecmp (cmd_argv[0],cmd->name))
		{
			if (!strcmp(cmd->name, "kill"))
			{
				if ((trace_state == read_trace || trace_state == write_trace)) 
				{
					trace_state = stop_trace;
					printf("GAJA: command = kill\n");
				}
			}

			if (!cmd->function)
				Cmd_ForwardToServer ();
			else
				cmd->function ();
			return;
		}
	}

// check alias
	for (a=cmd_alias ; a ; a=a->next)
	{
		if (!Q_strcasecmp (cmd_argv[0], a->name))
		{
			Cbuf_InsertText (a->value);
			return;
		}
	}
	
// check cvars
	if (!Cvar_Command () && (cl_warncmd.value || developer.value))
		Con_Printf ("Unknown command \"%s\"\n", Cmd_Argv(0));
	
}
开发者ID:jrk,项目名称:QuakeTM,代码行数:56,代码来源:cmd.c


示例11: Cmd_StuffCmds_f

/*
===============
Cmd_StuffCmds_f

Adds command line parameters as script statements
Commands lead with a +, and continue until a - or another +
xash +prog jctest.qp +cmd amlev1
xash -nosound +cmd amlev1
===============
*/
void Cmd_StuffCmds_f( void )
{
	int	i, j, l = 0;
	char	build[MAX_MSGLEN]; // this is for all commandline options combined (and is bounds checked)

	if(Cmd_Argc() != 1)
	{
		Msg( "stuffcmds : execute command line parameters\n");
		return;
	}

	// no reason to run the commandline arguments twice
	if(Sys.stuffcmdsrun) return;

	Sys.stuffcmdsrun = true;
	build[0] = 0;

	for (i = 0; i < fs_argc; i++)
	{
		if (fs_argv[i] && fs_argv[i][0] == '+' && (fs_argv[i][1] < '0' || fs_argv[i][1] > '9') && l + strlen(fs_argv[i]) - 1 <= sizeof(build) - 1)
		{
			j = 1;
			while (fs_argv[i][j]) build[l++] = fs_argv[i][j++];

			i++;
			for ( ; i < fs_argc; i++)
			{
				if (!fs_argv[i]) continue;
				if ((fs_argv[i][0] == '+' || fs_argv[i][0] == '-') && (fs_argv[i][1] < '0' || fs_argv[i][1] > '9'))
					break;
				if (l + strlen(fs_argv[i]) + 4 > sizeof(build) - 1)
					break;
				build[l++] = ' ';
				if (strchr(fs_argv[i], ' ')) build[l++] = '\"';
				for (j = 0; fs_argv[i][j]; j++) build[l++] = fs_argv[i][j];
				if (strchr(fs_argv[i], ' ')) build[l++] = '\"';
			}
			build[l++] = '\n';
			i--;
		}
	}

	// now terminate the combined string and prepend it to the command buffer
	// we already reserved space for the terminator
	build[l++] = 0;
	Cbuf_InsertText( build );
}
开发者ID:a1batross,项目名称:Xash3D_ancient,代码行数:57,代码来源:cmd.c


示例12: Cbuf_ExecuteText

/*
============
Cbuf_ExecuteText
============
*/
void Cbuf_ExecuteText (int exec_when, char *text)
{
	switch (exec_when)
	{
	case EXEC_NOW:
		Cmd_ExecuteString (text);
		break;
	case EXEC_INSERT:
		Cbuf_InsertText (text);
		break;
	case EXEC_APPEND:
		Cbuf_AddText (text);
		break;
	default:
		Com_Error (ERR_FATAL, "Cbuf_ExecuteText: bad exec_when");
	}
}
开发者ID:raynorpat,项目名称:quake2,代码行数:22,代码来源:cmd.c


示例13: Cmd_RunAlias_f

/*
============
Cmd_RunAlias_f
============
*/
void Cmd_RunAlias_f(void)
{
	cmd_alias_t	*alias;
	char 		*name = Cmd_Argv(0);
	char 		*args = Cmd_ArgsFrom(1);

	// Find existing alias
	for (alias = cmd_aliases; alias; alias=alias->next)
	{
		if (!Q_stricmp( name, alias->name ))
			break;
	}

	if (!alias)
		Com_Error(ERR_FATAL, "Alias: Alias %s doesn't exist", name);

	Cbuf_InsertText(va("%s %s", alias->exec, args));
}
开发者ID:TheDushan,项目名称:OpenWolf,代码行数:23,代码来源:cmd.cpp


示例14: Menu_ItemAtCursor

static const char *Keys_MenuKey( int key )
{
	menuaction_s *item = ( menuaction_s * ) Menu_ItemAtCursor( &s_keys_menu );

	//pressing mouse1 to pick a new bind wont force bind/unbind itself - spaz
	if ( bind_grab && !(cursor.buttonused[MOUSEBUTTON1]&&key==K_MOUSE1))
	{	
		if ( key != K_ESCAPE && key != '`' )
		{
			char cmd[1024];

			Com_sprintf (cmd, sizeof(cmd), "bind \"%s\" \"%s\"\n", Key_KeynumToString(key), bindnames[item->generic.localdata[0]][0]);
			Cbuf_InsertText (cmd);
		}
		
		// Knightmare- added Psychospaz's mouse support
		//dont let selecting with mouse buttons screw everything up
		UI_RefreshCursorButtons();
		if (key==K_MOUSE1)
			cursor.buttonclicks[MOUSEBUTTON1] = -1;

		//Menu_SetStatusBar( &s_keys_menu, "enter to change, backspace to clear" );
		Menu_SetStatusBar( &s_keys_menu, "Press ENTER or LEFT CLICK to change the key. Press BACKSPACE to clear." );
		bind_grab = false;
		return menu_out_sound;
	}

	switch ( key )
	{
	case K_KP_ENTER:
	case K_ENTER:
		if (item == &s_keys_back_action) { // back action hack
			UI_BackMenu(item); return NULL; }
		KeyBindingFunc( item );
		return menu_in_sound;
	case K_BACKSPACE:		// delete bindings
	case K_DEL:				// delete bindings
	case K_KP_DEL:
		M_UnbindCommand( bindnames[item->generic.localdata[0]][0] );
		return menu_out_sound;
	default:
		return Default_MenuKey( &s_keys_menu, key );
	}
}
开发者ID:AimHere,项目名称:thirty-flights-of-linux,代码行数:44,代码来源:ui_options_keys.c


示例15: Cmd_ExecFile

/*
===============
Cmd_ExecFile
===============
*/
static void Cmd_ExecFile( char *f )
{
	int i;

	COM_Compress (f);
	
	Cvar_Get( "arg_all", Cmd_ArgsFrom(2), CVAR_TEMP | CVAR_ROM | CVAR_USER_CREATED, "" );
	Cvar_Set( "arg_all", Cmd_ArgsFrom(2) );
	Cvar_Get( "arg_count", va( "%i", Cmd_Argc() - 2 ), CVAR_TEMP | CVAR_ROM | CVAR_USER_CREATED, "" );
	Cvar_Set( "arg_count", va( "%i", Cmd_Argc() - 2 ) );

	for (i = Cmd_Argc() - 2; i; i--)
	{
		Cvar_Get( va("arg_%i", i), Cmd_Argv( i + 1 ), CVAR_TEMP | CVAR_ROM | CVAR_USER_CREATED, "" );
		Cvar_Set( va("arg_%i", i), Cmd_Argv( i + 1 ) );
	}

	Cbuf_InsertText (f);
}
开发者ID:TheDushan,项目名称:OpenWolf,代码行数:24,代码来源:cmd.cpp


示例16: Cmd_Strcmp_f

/*
===============
Cmd_Strcmp_f

Compares two strings, if true executes the third argument, if false executes the forth
===============
*/
void Cmd_Strcmp_f( void ) {
	char	*v;
	char 	*v1;
	char 	*v2;
	char	*vt;
	char	*vf;
	char  *op;

	if ( (Cmd_Argc () == 6 ) || (Cmd_Argc () == 5) ) {
		v1 = Cmd_Argv( 1 );
		op = Cmd_Argv( 2 );
		v2 = Cmd_Argv( 3 );
		vt = Cmd_Argv( 4 );
		if ( ( !strcmp( op, "="  ) && !strcmp( v1, v2 ) ) ||
			( !strcmp( op, "!=" ) && strcmp( v1, v2 ) ) )
		{
			v = vt;
		}
		else if ( ( !strcmp( op, "="  ) && strcmp( v1, v2 ) ) ||
			( !strcmp( op, "!=" ) && !strcmp( v1, v2 ) ) )
		{
			if ( Cmd_Argc () == 6 ) 
			{
				vf = Cmd_Argv( 5 );
				v = vf;
			}
			else
			{
				return;
			}
		}
		else
		{
			Com_Printf ("invalid operator in strcmp command. valid operators are = != \n");
			return;
		}
	}
	else {
		Com_Printf ("strcmp <string1> <operator> <string2> <cmdthen> (<cmdelse>) : compares the first two strings and executes <cmdthen> if true, <cmdelse> if false\n");
		return;
	}
	Cbuf_InsertText( va("%s\n", v ) );
}
开发者ID:shawnd,项目名称:urt-bumpy-engine,代码行数:50,代码来源:cmd.c


示例17: SV_ParseStringCommand

/*
==================
SV_ParseStringCommand

Client command string
==================
*/
void SV_ParseStringCommand(client_t *cl)
{
	char *s;
	int ret;

	s = MSG_ReadString();
	
	// Determine whether the command is appropriate
	ret = SV_ValidateClientCommand( s );
	switch ( ret )
	{
	case 2:
		Cbuf_InsertText (s);
		break;
	case 1:
		Cmd_ExecuteString (s, src_client);
		break;
	default:

		Cmd_TokenizeString(s);

		ConCommandBase const *pCommand = ConCommandBase::FindCommand( Cmd_Argv( 0 ) );
		if ( pCommand && pCommand->IsCommand() && pCommand->IsBitSet( FCVAR_EXTDLL ) )
		{
			// Allow cheat commands in singleplayer, debug, or multiplayer with sv_cheats on
#ifndef _DEBUG
			if ( pCommand->IsBitSet( FCVAR_CHEAT ) )
			{
				if ( svs.maxclients > 1 && sv_cheats.GetInt() == 0 )
					break;
			}
#endif

			serverGameClients->SetCommandClient( host_client - svs.clients );
			( ( ConCommand * )pCommand )->Dispatch();
		}
		else
		{
			serverGameClients->ClientCommand( sv_player );
		}
		break;
	}
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:50,代码来源:sv_user.cpp


示例18: SV_Init

/*
====================
SV_Init
====================
*/
void SV_Init (void)
{
	Sys_Printf ("Host_Init\n");

	Memory_Init (host_parms->membase, host_parms->memsize);
	Cbuf_Init ();
	Cmd_Init ();

	COM_Init ();
	FS_Init ();

	PR_Init ();
	Mod_Init ();

	SV_InitNet ();

	SV_InitLocal ();
	Pmove_Init ();

	Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
	host_hunklevel = Hunk_LowMark ();

	Cbuf_InsertText ("exec server.cfg\n");
	Cbuf_Execute ();
	// unlock the early-set cvars after init
	Cvar_UnlockAll ();

	host_initialized = true;

	Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
	Con_Printf ("%4.1f megabyte heap\n", host_parms->memsize/(1024*1024.0));
	Con_Printf ("======== HexenWorld Initialized ========\n");

	// process command line arguments
	Cmd_StuffCmds_f ();
	Cbuf_Execute ();

	// if a map wasn't specified on the command line, spawn demo1.map
	if (sv.state == ss_dead)
		Cmd_ExecuteString ("map demo1", src_command);
	if (sv.state == ss_dead)
		SV_Error ("Couldn't spawn a server");
}
开发者ID:crutchwalkfactory,项目名称:motocakerteam,代码行数:48,代码来源:sv_main.c


示例19: Cbuf_ExecuteText

/*
============
Cbuf_ExecuteText
============
*/
void Cbuf_ExecuteText( int exec_when, const char *text ) {
	switch ( exec_when )
	{
	case EXEC_NOW:
		if ( text && strlen( text ) > 0 ) {
			Cmd_ExecuteString( text );
		} else {
			Cbuf_Execute();
		}
		break;
	case EXEC_INSERT:
		Cbuf_InsertText( text );
		break;
	case EXEC_APPEND:
		Cbuf_AddText( text );
		break;
	default:
		Com_Error( ERR_FATAL, "Cbuf_ExecuteText: bad exec_when" );
	}
}
开发者ID:JackalFrost,项目名称:RTCW-WSGF,代码行数:25,代码来源:cmd.c


示例20: Cbuf_ExecuteText

/*
============
Cbuf_ExecuteText
============
*/
void Cbuf_ExecuteText( int exec_when, const char *text )
{
	switch( exec_when )
	{
	case EXEC_NOW:
		if( text && com.strlen( text ))
			Cmd_ExecuteString( text );
		else Cbuf_Execute();
		break;
	case EXEC_INSERT:
		Cbuf_InsertText( text );
		break;
	case EXEC_APPEND:
		Cbuf_AddText( text );
		break;
	default:
		MsgDev( D_ERROR, "Cbuf_ExecuteText: bad execute target\n" );
		break;
	}
}
开发者ID:a1batross,项目名称:Xash3D_ancient,代码行数:25,代码来源:cmd.c



注:本文中的Cbuf_InsertText函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Cdr函数代码示例发布时间:2022-05-30
下一篇:
C++ Cbuf_ExecuteText函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap