您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Cmd_AddCommand函数代码示例

51自学网 2021-06-01 20:11:53
  C++
这篇教程C++ Cmd_AddCommand函数代码示例写得很实用,希望能帮到您。

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

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

示例1: S_Init

/** * @sa S_Shutdown * @sa S_Restart_f */void S_Init (void){    SDL_version version;    char drivername[MAX_VAR];    Com_Printf("/n------- sound initialization -------/n");    OBJZERO(s_env);    snd_init = Cvar_Get("snd_init", "1", CVAR_ARCHIVE, "Should the sound renderer get initialized");    snd_init->modified = false; /* don't restart right away */    Cmd_AddCommand("snd_restart", S_Restart_f, "Restart the sound renderer");    if (!snd_init->integer) {        Com_Printf("not initializing./n");        Cmd_AddCommand("music_change", Cmd_Dummy_f, "Dummy command if sound is disabled");        Cvar_Get("snd_music", "PsymongN3", 0, "Background music track");        return;    }    cl_soundSysPool = Mem_CreatePool("Client: Sound system");    snd_distance_scale = Cvar_Get("snd_distance_scale", "0.1", 0, "Sound distance scale");    snd_volume = Cvar_Get("snd_volume", "0.7", CVAR_ARCHIVE, "Sound volume - default is 0.7");    snd_rate = Cvar_Get("snd_rate", "44100", CVAR_ARCHIVE, "Hz value for sound renderer - default is 44100");    snd_chunkbufsize = Cvar_Get("snd_chunkbufsize", "1024", CVAR_ARCHIVE, "The sound buffer chunk size");    /* set volumes to be changed so they are applied again for next sound/music playing */    /** @todo implement the volume change for already loaded sample chunks */    snd_volume->modified = true;    Cmd_AddCommand("snd_play", S_Play_f, "Plays a sound fx file. Pass path relative to base/sound without file extension");    Cmd_AddParamCompleteFunction("snd_play", S_CompleteSounds);    if (SDL_WasInit(SDL_INIT_AUDIO) == 0) {        if (SDL_Init(SDL_INIT_AUDIO) < 0) {            Com_Printf("S_Init: %s./n", SDL_GetError());            return;        }    }    MIX_VERSION(&version)    Com_Printf("SDL_mixer version: %d.%d.%d/n", version.major, version.minor, version.patch);    Com_Printf("... requested audio rate: %i/n", snd_rate->integer);    if (Mix_OpenAudio(snd_rate->integer, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, snd_chunkbufsize->integer) == -1) {        Com_Printf("S_Init: %s/n", Mix_GetError());        return;    }    if (Mix_QuerySpec(&s_env.rate, &s_env.format, &s_env.numChannels) == 0) {        Com_Printf("S_Init: %s/n", Mix_GetError());        return;    }    if (SDL_AudioDriverName(drivername, sizeof(drivername)) == NULL)        Q_strncpyz(drivername, "(UNKNOWN)", sizeof(drivername));    Com_Printf("... driver: '%s'/n", drivername);    if (Mix_AllocateChannels(MAX_CHANNELS) != MAX_CHANNELS) {        Com_Printf("S_Init: %s/n", Mix_GetError());        return;    }    Mix_ChannelFinished(S_FreeChannel);    Com_Printf("... audio rate: %i/n", s_env.rate);    Com_Printf("... audio channels: %i/n", s_env.numChannels);#if COMPARE_VERSION(1, 2, 10)    if (!(Mix_Init(MIX_INIT_OGG) & MIX_INIT_OGG))        Com_Printf("... could not load ogg vorbis support/n");    else        Com_Printf("... loaded ogg vorbis support/n");#endif    s_env.initialized = true;    M_Init();}
开发者ID:MyWifeRules,项目名称:ufoai-1,代码行数:83,


示例2: FMod_Init

void FMod_Init (void){	int lastid;	Cmd_AddCommand("f_modified", FMod_Response);	memset (check_models, 0, sizeof (check_models));	lastid = FMod_AddModel ("progs/armor.mdl",			FMOD_DM | FMOD_TF,	progs_armor_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_armor);	FMod_AddModelAlt(lastid, &mdlhash_ruohis_armor);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_armor);	lastid = FMod_AddModel ("progs/backpack.mdl",		FMOD_DM | FMOD_TF,	progs_backpack_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_backpack);	FMod_AddModel ("progs/bolt2.mdl",			FMOD_DM | FMOD_TF,	progs_bolt2_mdl_FMOD_DM_FMOD_TF);	FMod_AddModel ("progs/end1.mdl",			FMOD_DM | FMOD_TF,	progs_end1_mdl_FMOD_DM_FMOD_TF);	lastid = FMod_AddModel ("progs/end2.mdl",			FMOD_DM | FMOD_TF,	progs_end2_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_unknown_end2);	lastid = FMod_AddModel ("progs/end3.mdl",			FMOD_DM | FMOD_TF,	progs_end3_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_unknown_end3);	lastid = FMod_AddModel ("progs/end4.mdl",			FMOD_DM | FMOD_TF,	progs_end4_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_unknown_end4);	FMod_AddModel ("progs/eyes.mdl",			FMOD_DM | FMOD_TF,	progs_eyes_mdl_FMOD_DM_FMOD_TF);	lastid = FMod_AddModel ("progs/g_light.mdl",			FMOD_DM | FMOD_TF,	progs_g_light_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_g_light);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_g_light);	lastid = FMod_AddModel ("progs/g_nail.mdl",			FMOD_DM | FMOD_TF,	progs_g_nail_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_g_nail);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_g_nail);	lastid = FMod_AddModel ("progs/g_nail2.mdl",			FMOD_DM | FMOD_TF,	progs_g_nail2_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_g_nail2);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_g_nail2);	lastid = FMod_AddModel ("progs/g_rock.mdl",			FMOD_DM | FMOD_TF,	progs_g_rock_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_g_rock);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_g_rock);	lastid = FMod_AddModel ("progs/g_rock2.mdl",			FMOD_DM | FMOD_TF,	progs_g_rock2_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_g_rock2);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_g_rock2);	lastid = FMod_AddModel ("progs/g_shot.mdl",			FMOD_DM | FMOD_TF,	progs_g_shot_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_g_shot);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_g_shot);	lastid = FMod_AddModel ("progs/gib1.mdl",			FMOD_DM | FMOD_TF,	progs_gib1_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_gib1);	lastid = FMod_AddModel ("progs/gib2.mdl",			FMOD_DM | FMOD_TF,	progs_gib2_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_gib2);	lastid = FMod_AddModel ("progs/gib3.mdl",			FMOD_DM | FMOD_TF,	progs_gib3_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_gib3);	lastid = FMod_AddModel ("progs/grenade.mdl",			FMOD_DM | FMOD_TF,	progs_grenade_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_grenade);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_grenade);	lastid = FMod_AddModel ("progs/invisibl.mdl",		FMOD_DM | FMOD_TF,	progs_invisibl_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_invisibl);	lastid = FMod_AddModel ("progs/invulner.mdl",		FMOD_DM | FMOD_TF,	progs_invulner_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_invulner);	lastid = FMod_AddModel ("progs/missile.mdl",			FMOD_DM | FMOD_TF,	progs_missile_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_missile);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_missile);	lastid = FMod_AddModel ("progs/quaddama.mdl",		FMOD_DM | FMOD_TF,	progs_quaddama_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_quaddama);	lastid = FMod_AddModel ("progs/s_spike.mdl",			FMOD_DM | FMOD_TF,	progs_s_spike_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_s_spike);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_s_spike);	lastid = FMod_AddModel ("progs/spike.mdl",			FMOD_DM | FMOD_TF,	progs_spike_mdl_FMOD_DM_FMOD_TF);	FMod_AddModelAlt(lastid, &mdlhash_debug_spike);	FMod_AddModelAlt(lastid, &mdlhash_plaguespak_spike);	FMod_AddModel ("progs/suit.mdl",			FMOD_DM | FMOD_TF,	progs_suit_mdl_FMOD_DM_FMOD_TF);	FMod_AddModel ("progs/player.mdl",			FMOD_DM,			progs_player_mdl_FMOD_DM);	FMod_AddModel ("progs/player.mdl",			FMOD_TF,			progs_player_mdl_FMOD_TF);	FMod_AddModel ("progs/tf_flag.mdl",			FMOD_TF,			progs_tf_flag_mdl_FMOD_TF);	FMod_AddModel ("progs/turrbase.mdl",		FMOD_TF,			progs_turrbase_mdl_FMOD_TF);	FMod_AddModel ("progs/turrgun.mdl",			FMOD_TF,			progs_turrgun_mdl_FMOD_TF);	FMod_AddModel ("progs/disp.mdl",			FMOD_TF,			progs_disp_mdl_FMOD_TF);	FMod_AddModel ("progs/tf_stan.mdl",			FMOD_TF,			progs_tf_stan_mdl_FMOD_TF);	FMod_AddModel ("progs/hgren2.mdl",			FMOD_TF,			progs_hgren2_mdl_FMOD_TF); // gren1	FMod_AddModel ("progs/grenade2.mdl",		FMOD_TF,			progs_grenade2_mdl_FMOD_TF); // gren2	FMod_AddModel ("progs/detpack.mdl",			FMOD_TF,			progs_detpack_mdl_FMOD_TF); // detpack	FMod_AddModel ("progs/s_bubble.spr",		FMOD_DM | FMOD_TF,	progs_s_bubble_spr_FMOD_DM_FMOD_TF);	FMod_AddModel ("progs/s_explod.spr",		FMOD_DM | FMOD_TF,	progs_s_explod_spr_FMOD_DM_FMOD_TF);//.........这里部分代码省略.........
开发者ID:jogi1,项目名称:camquake,代码行数:101,


示例3: SV_InitOperatorCommands

voidSV_InitOperatorCommands(void){	Cmd_AddCommand("heartbeat", SV_Heartbeat_f);	Cmd_AddCommand("kick", SV_Kick_f);	Cmd_AddCommand("status", SV_Status_f);	Cmd_AddCommand("serverinfo", SV_Serverinfo_f);	Cmd_AddCommand("dumpuser", SV_DumpUser_f);	Cmd_AddCommand("map", SV_Map_f);	Cmd_AddCommand("demomap", SV_DemoMap_f);	Cmd_AddCommand("gamemap", SV_GameMap_f);	Cmd_AddCommand("setmaster", SV_SetMaster_f);	if (dedicated->value)	{		Cmd_AddCommand("say", SV_ConSay_f);	}	Cmd_AddCommand("serverrecord", SV_ServerRecord_f);	Cmd_AddCommand("serverstop", SV_ServerStop_f);	Cmd_AddCommand("save", SV_Savegame_f);	Cmd_AddCommand("load", SV_Loadgame_f);	Cmd_AddCommand("killserver", SV_KillServer_f);	Cmd_AddCommand("sv", SV_ServerCommand_f);}
开发者ID:Clever-Boy,项目名称:yquake2,代码行数:29,


示例4: CL_InitInput

/*============CL_InitInput============*/void CL_InitInput(void){	Cmd_AddCommand("+moveup", IN_UpDown);	Cmd_AddCommand("-moveup", IN_UpUp);	Cmd_AddCommand("+movedown", IN_DownDown);	Cmd_AddCommand("-movedown", IN_DownUp);	Cmd_AddCommand("+left", IN_LeftDown);	Cmd_AddCommand("-left", IN_LeftUp);	Cmd_AddCommand("+right", IN_RightDown);	Cmd_AddCommand("-right", IN_RightUp);	Cmd_AddCommand("+forward", IN_ForwardDown);	Cmd_AddCommand("-forward", IN_ForwardUp);	Cmd_AddCommand("+back", IN_BackDown);	Cmd_AddCommand("-back", IN_BackUp);	Cmd_AddCommand("+lookup", IN_LookupDown);	Cmd_AddCommand("-lookup", IN_LookupUp);	Cmd_AddCommand("+lookdown", IN_LookdownDown);	Cmd_AddCommand("-lookdown", IN_LookdownUp);	Cmd_AddCommand("+strafe", IN_StrafeDown);	Cmd_AddCommand("-strafe", IN_StrafeUp);	Cmd_AddCommand("+moveleft", IN_MoveleftDown);	Cmd_AddCommand("-moveleft", IN_MoveleftUp);	Cmd_AddCommand("+moveright", IN_MoverightDown);	Cmd_AddCommand("-moveright", IN_MoverightUp);	Cmd_AddCommand("+speed", IN_SpeedDown);	Cmd_AddCommand("-speed", IN_SpeedUp);	Cmd_AddCommand("+attack", IN_Button0Down);     // ---- id   (primary firing)	Cmd_AddCommand("-attack", IN_Button0Up);	Cmd_AddCommand("+button1", IN_Button1Down);	Cmd_AddCommand("-button1", IN_Button1Up);	Cmd_AddCommand("+useitem", IN_UseItemDown);	Cmd_AddCommand("-useitem", IN_UseItemUp);	Cmd_AddCommand("+salute", IN_Button3Down);	Cmd_AddCommand("-salute", IN_Button3Up);	Cmd_AddCommand("+activate", IN_ActivateDown);	Cmd_AddCommand("-activate", IN_ActivateUp);	Cmd_AddCommand("+prone", IN_ProneDown);	Cmd_AddCommand("-prone", IN_ProneUp);	Cmd_AddCommand("+sprint", IN_SprintDown);	Cmd_AddCommand("-sprint", IN_SprintUp);	// wolf buttons	Cmd_AddCommand("+attack2", IN_Wbutton0Down);          // secondary firing	Cmd_AddCommand("-attack2", IN_Wbutton0Up);	Cmd_AddCommand("+zoom", IN_ZoomDown);	Cmd_AddCommand("-zoom", IN_ZoomUp);	Cmd_AddCommand("+reload", IN_ReloadDown);	Cmd_AddCommand("-reload", IN_ReloadUp);	Cmd_AddCommand("+leanleft", IN_LeanLeftDown);	Cmd_AddCommand("-leanleft", IN_LeanLeftUp);	Cmd_AddCommand("+leanright", IN_LeanRightDown);	Cmd_AddCommand("-leanright", IN_LeanRightUp);	Cmd_AddCommand("+mlook", IN_MLookDown);	Cmd_AddCommand("-mlook", IN_MLookUp);	Cmd_AddCommand("help", IN_Help);	cl_nodelta   = Cvar_Get("cl_nodelta", "0", 0);	cl_debugMove = Cvar_Get("cl_debugMove", "0", 0);}
开发者ID:sxweet,项目名称:etlegacy,代码行数:74,


示例5: CL_RegisterInput

/*============CL_RegisterInput============*/void CL_RegisterInput( void ) {    Cmd_AddCommand ("centerview",IN_CenterView);    Cmd_AddCommand ("+moveup",IN_UpDown);    Cmd_AddCommand ("-moveup",IN_UpUp);    Cmd_AddCommand ("+movedown",IN_DownDown);    Cmd_AddCommand ("-movedown",IN_DownUp);    Cmd_AddCommand ("+left",IN_LeftDown);    Cmd_AddCommand ("-left",IN_LeftUp);    Cmd_AddCommand ("+right",IN_RightDown);    Cmd_AddCommand ("-right",IN_RightUp);    Cmd_AddCommand ("+forward",IN_ForwardDown);    Cmd_AddCommand ("-forward",IN_ForwardUp);    Cmd_AddCommand ("+back",IN_BackDown);    Cmd_AddCommand ("-back",IN_BackUp);    Cmd_AddCommand ("+lookup", IN_LookupDown);    Cmd_AddCommand ("-lookup", IN_LookupUp);    Cmd_AddCommand ("+lookdown", IN_LookdownDown);    Cmd_AddCommand ("-lookdown", IN_LookdownUp);    Cmd_AddCommand ("+strafe", IN_StrafeDown);    Cmd_AddCommand ("-strafe", IN_StrafeUp);    Cmd_AddCommand ("+moveleft", IN_MoveleftDown);    Cmd_AddCommand ("-moveleft", IN_MoveleftUp);    Cmd_AddCommand ("+moveright", IN_MoverightDown);    Cmd_AddCommand ("-moveright", IN_MoverightUp);    Cmd_AddCommand ("+speed", IN_SpeedDown);    Cmd_AddCommand ("-speed", IN_SpeedUp);    Cmd_AddCommand ("+attack", IN_AttackDown);    Cmd_AddCommand ("-attack", IN_AttackUp);    Cmd_AddCommand ("+use", IN_UseDown);    Cmd_AddCommand ("-use", IN_UseUp);    Cmd_AddCommand ("impulse", IN_Impulse);    Cmd_AddCommand ("+klook", IN_KLookDown);    Cmd_AddCommand ("-klook", IN_KLookUp);    Cmd_AddCommand( "+mlook", IN_MLookDown );    Cmd_AddCommand( "-mlook", IN_MLookUp );    Cmd_AddCommand( "in_restart", IN_Restart_f );    cl_nodelta = Cvar_Get ("cl_nodelta", "0", 0);    cl_maxpackets = Cvar_Get( "cl_maxpackets", "30", 0 );    cl_fuzzhack = Cvar_Get( "cl_fuzzhack", "0", 0 );    cl_packetdup = Cvar_Get( "cl_packetdup", "1", 0 );#ifdef _DEBUG    cl_showpackets = Cvar_Get( "cl_showpackets", "0", 0 );#endif    cl_instantpacket = Cvar_Get( "cl_instantpacket", "1", 0 );    cl_batchcmds = Cvar_Get( "cl_batchcmds", "1", 0 );    cl_upspeed = Cvar_Get ( "cl_upspeed", "200", 0 );    cl_forwardspeed = Cvar_Get ( "cl_forwardspeed", "200", 0 );    cl_sidespeed = Cvar_Get ( "cl_sidespeed", "200", 0 );    cl_yawspeed = Cvar_Get ( "cl_yawspeed", "140", 0 );    cl_pitchspeed = Cvar_Get ( "cl_pitchspeed", "150", CVAR_CHEAT );    cl_anglespeedkey = Cvar_Get ( "cl_anglespeedkey", "1.5", CVAR_CHEAT );    cl_run = Cvar_Get( "cl_run", "1", CVAR_ARCHIVE );    freelook = Cvar_Get( "freelook", "0", CVAR_ARCHIVE );    lookspring = Cvar_Get ( "lookspring", "0", CVAR_ARCHIVE );    lookstrafe = Cvar_Get ( "lookstrafe", "0", CVAR_ARCHIVE );    sensitivity = Cvar_Get ( "sensitivity", "3", CVAR_ARCHIVE );    m_pitch = Cvar_Get ( "m_pitch", "0.022", CVAR_ARCHIVE );    m_yaw = Cvar_Get ( "m_yaw", "0.022", 0 );    m_forward = Cvar_Get ( "m_forward", "1", 0 );    m_side = Cvar_Get ( "m_side", "1", 0 );    m_filter = Cvar_Get( "m_filter", "0", 0 );    m_accel = Cvar_Get( "m_accel", "0", 0 );    m_autosens = Cvar_Get( "m_autosens", "0", 0 );}
开发者ID:Bad-ptr,项目名称:q2pro,代码行数:75,


示例6: S_Init

/*=================S_Init=================*/void S_Init(void){	cvar_t         *cv;	qboolean        started = qfalse;	Com_Printf("------ Initializing Sound ------/n");	s_volume = Cvar_Get("s_volume", "0.8", CVAR_ARCHIVE);	s_musicVolume = Cvar_Get("s_musicvolume", "0.25", CVAR_ARCHIVE);	s_muted = Cvar_Get("s_muted", "0", CVAR_ROM);	s_doppler = Cvar_Get("s_doppler", "1", CVAR_ARCHIVE);	s_backend = Cvar_Get("s_backend", "", CVAR_ROM);	s_muteWhenMinimized = Cvar_Get("s_muteWhenMinimized", "0", CVAR_ARCHIVE);	s_muteWhenUnfocused = Cvar_Get("s_muteWhenUnfocused", "0", CVAR_ARCHIVE);	cv = Cvar_Get("s_initsound", "1", 0);	if(!cv->integer)	{		Com_Printf("Sound disabled./n");	}	else	{		S_CodecInit();		Cmd_AddCommand("play", S_Play_f);		Cmd_AddCommand("music", S_Music_f);		Cmd_AddCommand("stopmusic", S_StopMusic_f);		Cmd_AddCommand("s_list", S_SoundList);		Cmd_AddCommand("s_stop", S_StopAllSounds);		Cmd_AddCommand("s_info", S_SoundInfo);		cv = Cvar_Get("s_useOpenAL", "1", CVAR_ARCHIVE);		if(cv->integer)		{			//OpenAL			started = S_AL_Init(&si);			Cvar_Set("s_backend", "OpenAL");		}		if(!started)		{			started = S_Base_Init(&si);			Cvar_Set("s_backend", "base");		}		if(started)		{			if(!S_ValidSoundInterface(&si))			{				Com_Error(ERR_FATAL, "Sound interface invalid.");			}			S_SoundInfo();			Com_Printf("Sound initialization successful./n");		}		else		{			Com_Printf("Sound initialization failed./n");		}	}	Com_Printf("--------------------------------/n");}
开发者ID:SinSiXX,项目名称:Rogue-Reborn,代码行数:69,


示例7: MP3_Init

void MP3_Init(void){	XMMS_LoadLibrary();	if (!MP3_IsActive())		return;	Cmd_AddCommand("xmms_prev", MP3_Prev_f);	Cmd_AddCommand("xmms_play", MP3_PlayTrackNum_f);	Cmd_AddCommand("xmms_pause", MP3_Pause_f);	Cmd_AddCommand("xmms_stop", MP3_Stop_f);	Cmd_AddCommand("xmms_next", MP3_Next_f);	Cmd_AddCommand("xmms_fforward", MP3_FastForward_f);	Cmd_AddCommand("xmms_rewind", MP3_Rewind_f);	Cmd_AddCommand("xmms_fadeout", MP3_FadeOut_f);	Cmd_AddCommand("xmms_shuffle", MP3_Shuffle_f);	Cmd_AddCommand("xmms_repeat", MP3_Repeat_f);	Cmd_AddCommand("xmms_volume", MP3_SetVolume_f );	Cmd_AddCommand("xmms_playlist", MP3_PrintPlaylist_f);	Cmd_AddCommand("xmms_songinfo", MP3_SongInfo_f);	Cmd_AddCommand("xmms_start", MP3_Execute_f);	xmms_dir = Cvar_Get("xmms_dir", "/usr/local/bin", CVAR_ARCHIVE);	xmms_session = Cvar_Get("xmms_session", "0", CVAR_ARCHIVE);	xmms_messages = Cvar_Get("xmms_messages", "0", CVAR_ARCHIVE);	Cmd_AddMacro( "cursong", MP3_SongTitle_m );}
开发者ID:hifi-unmaintained,项目名称:aprq2,代码行数:28,


示例8: CL_InitInput

/*============CL_InitInput============*/void CL_InitInput (void){	Cmd_AddCommand ("+moveup",IN_UpDown);	Cmd_AddCommand ("-moveup",IN_UpUp);	Cmd_AddCommand ("+movedown",IN_DownDown);	Cmd_AddCommand ("-movedown",IN_DownUp);	Cmd_AddCommand ("+left",IN_LeftDown);	Cmd_AddCommand ("-left",IN_LeftUp);	Cmd_AddCommand ("+right",IN_RightDown);	Cmd_AddCommand ("-right",IN_RightUp);	Cmd_AddCommand ("+forward",IN_ForwardDown);	Cmd_AddCommand ("-forward",IN_ForwardUp);	Cmd_AddCommand ("+back",IN_BackDown);	Cmd_AddCommand ("-back",IN_BackUp);	Cmd_AddCommand ("+lookup", IN_LookupDown);	Cmd_AddCommand ("-lookup", IN_LookupUp);	Cmd_AddCommand ("+lookdown", IN_LookdownDown);	Cmd_AddCommand ("-lookdown", IN_LookdownUp);	Cmd_AddCommand ("+strafe", IN_StrafeDown);	Cmd_AddCommand ("-strafe", IN_StrafeUp);	Cmd_AddCommand ("+moveleft", IN_MoveleftDown);	Cmd_AddCommand ("-moveleft", IN_MoveleftUp);	Cmd_AddCommand ("+moveright", IN_MoverightDown);	Cmd_AddCommand ("-moveright", IN_MoverightUp);	Cmd_AddCommand ("+speed", IN_SpeedDown);	Cmd_AddCommand ("-speed", IN_SpeedUp);	Cmd_AddCommand ("+attack", IN_AttackDown);	Cmd_AddCommand ("-attack", IN_AttackUp);	Cmd_AddCommand ("+use", IN_UseDown);	Cmd_AddCommand ("-use", IN_UseUp);	Cmd_AddCommand ("+jump", IN_JumpDown);	Cmd_AddCommand ("-jump", IN_JumpUp);	Cmd_AddCommand ("impulse", IN_Impulse);	Cmd_AddCommand ("+klook", IN_KLookDown);	Cmd_AddCommand ("-klook", IN_KLookUp);	Cmd_AddCommand ("+mlook", IN_MLookDown);	Cmd_AddCommand ("-mlook", IN_MLookUp);	Cvar_RegisterVariable (&cl_nodelta);}
开发者ID:DaneTheory,项目名称:quake,代码行数:45,


示例9: SV_InitOperatorCommands

/*==================SV_InitOperatorCommands==================*/void SV_InitOperatorCommands( void ){	Cmd_AddCommand( "heartbeat", SV_Heartbeat_f, "send a heartbeat to the master server" );	Cmd_AddCommand( "kick", SV_Kick_f, "kick a player off the server by number or name" );	Cmd_AddCommand( "status", SV_Status_f, "print server status information" );	Cmd_AddCommand( "serverinfo", SV_ServerInfo_f, "print server settings" );	Cmd_AddCommand( "clientinfo", SV_ClientInfo_f, "print user infostring (player num required)" );	Cmd_AddCommand( "playersonly", SV_PlayersOnly_f, "freezes physics, except for players" );	Cmd_AddCommand( "map", SV_Map_f, "start new level" );	Cmd_AddCommand( "newgame", SV_NewGame_f, "begin new game" );	Cmd_AddCommand( "endgame", SV_EndGame_f, "end current game, takes ending message" );	Cmd_AddCommand( "killgame", SV_KillGame_f, "end current game" );	Cmd_AddCommand( "hazardcourse", SV_HazardCourse_f, "start a Hazard Course" );	Cmd_AddCommand( "changelevel", SV_ChangeLevel_f, "change level" );	Cmd_AddCommand( "changelevel2", SV_ChangeLevel2_f, "change level, in Half-Life style" );	Cmd_AddCommand( "restart", SV_Restart_f, "restart current level" );	Cmd_AddCommand( "reload", SV_Reload_f, "continue from latest save or restart level" );	Cmd_AddCommand( "entpatch", SV_EntPatch_f, "write entity patch to allow external editing" );	Cmd_AddCommand( "edicts_info", SV_EdictsInfo_f, "show info about edicts" );	Cmd_AddCommand( "entity_info", SV_EntityInfo_f, "show more info about edicts" );	Cmd_AddCommand( "save", SV_Save_f, "save the game to a file" );	Cmd_AddCommand( "load", SV_Load_f, "load a saved game file" );	Cmd_AddCommand( "savequick", SV_QuickSave_f, "save the game to the quicksave" );	Cmd_AddCommand( "loadquick", SV_QuickLoad_f, "load a quick-saved game file" );	Cmd_AddCommand( "killsave", SV_DeleteSave_f, "delete a saved game file and saveshot" );	Cmd_AddCommand( "autosave", SV_AutoSave_f, "save the game to 'autosave' file" );	if( host.type == HOST_DEDICATED )	{		Cmd_AddCommand( "say", SV_ConSay_f, "send a chat message to everyone on the server" );		Cmd_AddCommand( "killserver", SV_KillServer_f, "shutdown current server" );	}	else	{		Cmd_AddCommand( "map_background", SV_MapBackground_f, "set background map" );	}}
开发者ID:GAMELASTER,项目名称:xash3d,代码行数:42,


示例10: Commands_For_Configs_Init

static void Commands_For_Configs_Init (void){extern void SV_Floodprot_f (void);extern void SV_Floodprotmsg_f (void);extern void TP_MsgTrigger_f (void);extern void TP_MsgFilter_f (void);extern void TP_Took_f (void);extern void TP_Pickup_f (void);extern void TP_Point_f (void);extern void MT_AddMapGroups (void);extern void MT_MapGroup_f (void);extern void MT_AddSkyGroups (void);extern void MT_SkyGroup_f (void);extern void CL_Fog_f (void);extern void SB_SourceUnmarkAll(void);extern void SB_SourceMark(void);extern void LoadConfig_f(void);	//disconnect: fix it if i forgot something	Cmd_AddCommand ("floodprot", SV_Floodprot_f);	Cmd_AddCommand ("floodprotmsg", SV_Floodprotmsg_f);	Cmd_AddCommand ("msg_trigger", TP_MsgTrigger_f);	Cmd_AddCommand ("filter", TP_MsgFilter_f);	Cmd_AddCommand ("tp_took", TP_Took_f);	Cmd_AddCommand ("tp_pickup", TP_Pickup_f);	Cmd_AddCommand ("tp_point", TP_Point_f);	MT_AddMapGroups ();	Cmd_AddCommand ("mapgroup", MT_MapGroup_f);	MT_AddSkyGroups ();	Cmd_AddCommand ("skygroup", MT_SkyGroup_f);	Cmd_AddCommand ("fog", CL_Fog_f);	Cmd_AddCommand ("allskins", Skin_AllSkins_f);	Cmd_AddCommand ("sb_sourceunmarkall", SB_SourceUnmarkAll);	Cmd_AddCommand ("sb_sourcemark", SB_SourceMark);	Browser_Init2();}
开发者ID:laureon,项目名称:ezquake-source,代码行数:40,


示例11: R_RegisterSystemVars

static void R_RegisterSystemVars (void){	const cmdList_t *commands;	r_driver = Cvar_Get("r_driver", "", CVAR_ARCHIVE | CVAR_R_CONTEXT, "You can define the opengl driver you want to use - empty if you want to use the system default");	r_drawentities = Cvar_Get("r_drawentities", "1", 0, "Draw the local entities");	r_drawworld = Cvar_Get("r_drawworld", "1", 0, "Draw the world brushes");	r_isometric = Cvar_Get("r_isometric", "0", CVAR_ARCHIVE, "Draw the world in isometric mode");	r_nocull = Cvar_Get("r_nocull", "0", 0, "Don't perform culling for brushes and entities");	r_anisotropic = Cvar_Get("r_anisotropic", "1", CVAR_ARCHIVE);	r_texture_lod = Cvar_Get("r_texture_lod", "0", CVAR_ARCHIVE);	r_screenshot_format = Cvar_Get("r_screenshot_format", "jpg", CVAR_ARCHIVE, "png, jpg or tga are valid screenshot formats");	r_screenshot_jpeg_quality = Cvar_Get("r_screenshot_jpeg_quality", "75", CVAR_ARCHIVE, "jpeg quality in percent for jpeg screenshots");	r_threads = Cvar_Get("r_threads", "0", CVAR_ARCHIVE, "Activate threads for the renderer");	r_materials = Cvar_Get("r_materials", "1", CVAR_ARCHIVE, "Activate material subsystem");	r_default_specular = Cvar_Get("r_default_specular", "0.2", CVAR_R_CONTEXT, "Default specular exponent");	r_default_hardness = Cvar_Get("r_default_hardness", "0.2", CVAR_R_CONTEXT, "Default specular brightness");	Cvar_RegisterChangeListener("r_default_specular", R_UpdateDefaultMaterial);	Cvar_RegisterChangeListener("r_default_hardness", R_UpdateDefaultMaterial);	r_checkerror = Cvar_Get("r_checkerror", "0", CVAR_ARCHIVE, "Check for opengl errors");	r_shadows = Cvar_Get("r_shadows", "1", CVAR_ARCHIVE, "Multiplier for the alpha of the shadows");	r_stencilshadows = Cvar_Get("r_stencilshadows", "0", CVAR_ARCHIVE, "Activate or deactivate stencil shadows");	r_maxtexres = Cvar_Get("r_maxtexres", "2048", CVAR_ARCHIVE | CVAR_R_IMAGES, "The maximum texture resolution UFO should use");	r_texturemode = Cvar_Get("r_texturemode", "GL_LINEAR_MIPMAP_LINEAR", CVAR_ARCHIVE, "change the filtering and mipmapping for textures");	r_texturealphamode = Cvar_Get("r_texturealphamode", "GL_RGBA", CVAR_ARCHIVE);	r_texturesolidmode = Cvar_Get("r_texturesolidmode", "GL_RGB", CVAR_ARCHIVE);	r_wire = Cvar_Get("r_wire", "0", 0, "Draw the scene in wireframe mode");	r_showbox = Cvar_Get("r_showbox", "0", CVAR_ARCHIVE, "1=Shows model bounding box, 2=show also the brushes bounding boxes");	r_lightmap = Cvar_Get("r_lightmap", "0", CVAR_R_PROGRAMS, "Draw only the lightmap");	r_lightmap->modified = false;	r_deluxemap = Cvar_Get("r_deluxemap", "0", CVAR_R_PROGRAMS, "Draw only the deluxemap");	r_deluxemap->modified = false;	r_debug_normals = Cvar_Get("r_debug_normals", "0", CVAR_R_PROGRAMS, "Draw dot(normal, light_0 direction)");	r_debug_normals->modified = false;	r_debug_tangents = Cvar_Get("r_debug_tangents", "0", CVAR_R_PROGRAMS, "Draw tangent, bitangent, and normal dotted with light dir as RGB espectively");	r_debug_tangents->modified = false;	r_debug_lights = Cvar_Get("r_debug_lights", "0", CVAR_ARCHIVE, "Draw active light sources");	r_ext_texture_compression = Cvar_Get("r_ext_texture_compression", "0", CVAR_ARCHIVE | CVAR_R_CONTEXT);	r_ext_nonpoweroftwo = Cvar_Get("r_ext_nonpoweroftwo", "1", CVAR_ARCHIVE, "Enable or disable the non power of two extension");	r_ext_s3tc_compression = Cvar_Get("r_ext_s3tc_compression", "1", CVAR_ARCHIVE, "Also see r_ext_texture_compression");	r_intel_hack = Cvar_Get("r_intel_hack", "1", CVAR_ARCHIVE, "Intel cards have activated texture compression and no shaders until this is set to 0");	r_vertexbuffers = Cvar_Get("r_vertexbuffers", "0", CVAR_ARCHIVE | CVAR_R_CONTEXT, "Controls usage of OpenGL Vertex Buffer Objects (VBO) versus legacy vertex arrays.");	r_maxlightmap = Cvar_Get("r_maxlightmap", "2048", CVAR_ARCHIVE | CVAR_LATCH, "Reduce this value on older hardware");	Cvar_SetCheckFunction("r_maxlightmap", R_CvarCheckMaxLightmap);	r_drawbuffer = Cvar_Get("r_drawbuffer", "GL_BACK");	r_swapinterval = Cvar_Get("r_swapinterval", "0", CVAR_ARCHIVE | CVAR_R_CONTEXT, "Controls swap interval synchronization (V-Sync). Values between 0 and 2");	r_multisample = Cvar_Get("r_multisample", "0", CVAR_ARCHIVE | CVAR_R_CONTEXT, "Controls multisampling (anti-aliasing). Values between 0 and 4");	r_warp = Cvar_Get("r_warp", "1", CVAR_ARCHIVE, "Activates or deactivates warping surface rendering");	r_shownormals = Cvar_Get("r_shownormals", "0", CVAR_ARCHIVE, "Show normals on bsp surfaces");	r_bumpmap = Cvar_Get("r_bumpmap", "1.0", CVAR_ARCHIVE | CVAR_R_PROGRAMS, "Activate bump mapping");	r_specular = Cvar_Get("r_specular", "1.0", CVAR_ARCHIVE, "Controls specular parameters");	r_hardness = Cvar_Get("r_hardness", "1.0", CVAR_ARCHIVE, "Hardness control for GLSL shaders (specular, bump, ...)");	r_parallax = Cvar_Get("r_parallax", "1.0", CVAR_ARCHIVE, "Controls parallax parameters");	r_fog = Cvar_Get("r_fog", "1", CVAR_ARCHIVE | CVAR_R_PROGRAMS, "Activate or deactivate fog");	r_flares = Cvar_Get("r_flares", "1", CVAR_ARCHIVE, "Activate or deactivate flares");	r_coronas = Cvar_Get("r_coronas", "1", CVAR_ARCHIVE, "Activate or deactivate coronas");	r_particles = Cvar_Get("r_particles", "1", 0, "Activate or deactivate particle rendering");	r_drawtags = Cvar_Get("r_drawtags", "0", 0, "Activate or deactivate tag rendering");	for (commands = r_commands; commands->name; commands++)		Cmd_AddCommand(commands->name, commands->function, commands->description);}
开发者ID:Qazzian,项目名称:ufoai_suspend,代码行数:64,


示例12: Cvar_Init

/*============Cvar_InitReads in all archived cvars============*/void Cvar_Init (void) {	memset( cvar_indexes, 0, sizeof( cvar_indexes ) );	memset( hashTable, 0, sizeof( hashTable ) );	cvar_cheats = Cvar_Get( "sv_cheats", "1", CVAR_ROM|CVAR_SYSTEMINFO );	Cmd_AddCommand( "print", Cvar_Print_f );	Cmd_SetCommandCompletionFunc( "print", Cvar_CompleteCvarName );	Cmd_AddCommand( "toggle", Cvar_Toggle_f );	Cmd_SetCommandCompletionFunc( "toggle", Cvar_CompleteCvarName );	Cmd_AddCommand( "set", Cvar_Set_f );	Cmd_SetCommandCompletionFunc( "set", Cvar_CompleteCvarName );	Cmd_AddCommand( "sets", Cvar_Set_f );	Cmd_SetCommandCompletionFunc( "sets", Cvar_CompleteCvarName );	Cmd_AddCommand( "setu", Cvar_Set_f );	Cmd_SetCommandCompletionFunc( "setu", Cvar_CompleteCvarName );	Cmd_AddCommand( "seta", Cvar_Set_f );	Cmd_SetCommandCompletionFunc( "seta", Cvar_CompleteCvarName );	Cmd_AddCommand( "reset", Cvar_Reset_f );	Cmd_SetCommandCompletionFunc( "reset", Cvar_CompleteCvarName );	Cmd_AddCommand( "unset", Cvar_Unset_f );	Cmd_SetCommandCompletionFunc( "unset", Cvar_CompleteCvarName );	Cmd_AddCommand( "cvarlist", Cvar_List_f );	Cmd_AddCommand( "cvar_modified", Cvar_ListModified_f );	Cmd_AddCommand( "cvar_restart", Cvar_Restart_f );}
开发者ID:Razish,项目名称:CompJA,代码行数:33,


示例13: CL_UISystemCalls

/*====================CL_UISystemCallsThe ui module is making a system call====================*/intptr_t CL_UISystemCalls(intptr_t *args){	switch (args[0])	{	case UI_ERROR:		Com_Error(ERR_DROP, "%s", (char *)VMA(1));		return 0;	case UI_PRINT:		Com_Printf("%s", (char *)VMA(1));		return 0;	case UI_MILLISECONDS:		return Sys_Milliseconds();	case UI_CVAR_REGISTER:		Cvar_Register(VMA(1), VMA(2), VMA(3), args[4]);		return 0;	case UI_CVAR_UPDATE:		Cvar_Update(VMA(1));		return 0;	case UI_CVAR_SET:		Cvar_SetSafe(VMA(1), VMA(2));		return 0;	case UI_CVAR_VARIABLEVALUE:		return FloatAsInt(Cvar_VariableValue(VMA(1)));	case UI_CVAR_VARIABLESTRINGBUFFER:		Cvar_VariableStringBuffer(VMA(1), VMA(2), args[3]);		return 0;	case UI_CVAR_LATCHEDVARIABLESTRINGBUFFER:		Cvar_LatchedVariableStringBuffer(VMA(1), VMA(2), args[3]);		return 0;	case UI_CVAR_SETVALUE:		Cvar_SetValueSafe(VMA(1), VMF(2));		return 0;	case UI_CVAR_RESET:		Cvar_Reset(VMA(1));		return 0;	case UI_CVAR_CREATE:		Cvar_Register(NULL, VMA(1), VMA(2), args[3]);		return 0;	case UI_CVAR_INFOSTRINGBUFFER:		Cvar_InfoStringBuffer(args[1], VMA(2), args[3]);		return 0;	case UI_ARGC:		return Cmd_Argc();	case UI_ARGV:		Cmd_ArgvBuffer(args[1], VMA(2), args[3]);		return 0;	case UI_CMD_EXECUTETEXT:		if (args[1] == EXEC_NOW		    && (!strncmp(VMA(2), "snd_restart", 11)		        || !strncmp(VMA(2), "vid_restart", 11)		        || !strncmp(VMA(2), "quit", 5)))		{			Com_Printf(S_COLOR_YELLOW "turning EXEC_NOW '%.11s' into EXEC_INSERT/n", (const char *)VMA(2));			args[1] = EXEC_INSERT;		}		Cbuf_ExecuteText(args[1], VMA(2));		return 0;	case UI_ADDCOMMAND:		Cmd_AddCommand(VMA(1));		return 0;	case UI_FS_FOPENFILE:		return FS_FOpenFileByMode(VMA(1), VMA(2), args[3]);	case UI_FS_READ:		FS_Read(VMA(1), args[2], args[3]);		return 0;	case UI_FS_WRITE:		FS_Write(VMA(1), args[2], args[3]);		return 0;	case UI_FS_FCLOSEFILE:		FS_FCloseFile(args[1]);		return 0;	case UI_FS_DELETEFILE:		return FS_Delete(VMA(1));	case UI_FS_GETFILELIST:		return FS_GetFileList(VMA(1), VMA(2), VMA(3), args[4]);	case UI_R_REGISTERMODEL:		return re.RegisterModel(VMA(1));	case UI_R_REGISTERSKIN:		return re.RegisterSkin(VMA(1));	case UI_R_REGISTERSHADERNOMIP:		return re.RegisterShaderNoMip(VMA(1));	case UI_R_CLEARSCENE:		re.ClearScene();		return 0;	case UI_R_ADDREFENTITYTOSCENE:		re.AddRefEntityToScene(VMA(1));		return 0;	case UI_R_ADDPOLYTOSCENE:		re.AddPolyToScene(args[1], args[2], VMA(3));		return 0;	case UI_R_ADDPOLYSTOSCENE:		re.AddPolysToScene(args[1], args[2], VMA(3), args[4]);		return 0;//.........这里部分代码省略.........
开发者ID:belstgut,项目名称:etlegacy,代码行数:101,


示例14: IN_Init

void IN_Init(void){    Cmd_AddCommand ("force_centerview", Force_CenterView_f);}
开发者ID:matatk,项目名称:agrip,代码行数:4,


示例15: Host_Init

//.........这里部分代码省略.........	// initialize process nice level	Sys_InitProcessNice();	// initialize ixtable	Mathlib_Init();	// initialize filesystem (including fs_basedir, fs_gamedir, -game, scr_screenshot_name)	FS_Init();	// register the cvars for session locking	Host_InitSession();	// must be after FS_Init	Crypto_Init();	Crypto_Init_Commands();	NetConn_Init();	Curl_Init();	//PR_Init();	//PR_Cmd_Init();	PRVM_Init();	Mod_Init();	World_Init();	SV_Init();	V_Init(); // some cvars needed by server player physics (cl_rollangle etc)	Host_InitCommands();	Host_InitLocal();	Host_ServerOptions();	IRC_Init();	Thread_Init();	if (cls.state == ca_dedicated)		Cmd_AddCommand ("disconnect", CL_Disconnect_f, "disconnect from server (or disconnect all clients if running a server)");	else	{		Con_DPrintf("Initializing client/n");		R_Modules_Init();		Palette_Init();#ifdef CONFIG_MENU		MR_Init_Commands();#endif		VID_Shared_Init();		VID_Init();		Render_Init();		S_Init();#ifdef CONFIG_CD		CDAudio_Init();#endif		Key_Init();		CL_Init();	}	// save off current state of aliases, commands and cvars for later restore if FS_GameDir_f is called	// NOTE: menu commands are freed by Cmd_RestoreInitState	Cmd_SaveInitState();	// FIXME: put this into some neat design, but the menu should be allowed to crash	// without crashing the whole game, so this should just be a short-time solution	// here comes the not so critical stuff	if (setjmp(host_abortframe)) {		return;	}
开发者ID:mjtalkiewicz,项目名称:DarkPlacesRM,代码行数:66,


示例16: IN_Init

/** * @sa CL_InitLocal */void IN_Init (void){	Com_Printf("/n------- input initialization -------/n");	/* cvars */	in_debug = Cvar_Get("in_debug", "0", 0, "Show input key codes on game console");	cl_isometric = Cvar_Get("r_isometric", "0", CVAR_ARCHIVE, "Draw the world in isometric mode");	/* commands */	Cmd_AddCommand("+turnleft", IN_TurnLeftDown_f, N_("Rotate battlescape camera anti-clockwise"));	Cmd_AddCommand("-turnleft", IN_TurnLeftUp_f, NULL);	Cmd_AddCommand("+turnright", IN_TurnRightDown_f, N_("Rotate battlescape camera clockwise"));	Cmd_AddCommand("-turnright", IN_TurnRightUp_f, NULL);	Cmd_AddCommand("+turnup", IN_TurnUpDown_f, N_("Tilt battlescape camera up"));	Cmd_AddCommand("-turnup", IN_TurnUpUp_f, NULL);	Cmd_AddCommand("+turndown", IN_TurnDownDown_f, N_("Tilt battlescape camera down"));	Cmd_AddCommand("-turndown", IN_TurnDownUp_f, NULL);	Cmd_AddCommand("+pantilt", IN_PanTiltDown_f, N_("Move battlescape camera"));	Cmd_AddCommand("-pantilt", IN_PanTiltUp_f, NULL);	Cmd_AddCommand("+shiftleft", IN_ShiftLeftDown_f, N_("Move battlescape camera left"));	Cmd_AddCommand("-shiftleft", IN_ShiftLeftUp_f, NULL);	Cmd_AddCommand("+shiftleftup", IN_ShiftLeftUpDown_f, N_("Move battlescape camera top left"));	Cmd_AddCommand("-shiftleftup", IN_ShiftLeftUpUp_f, NULL);	Cmd_AddCommand("+shiftleftdown", IN_ShiftLeftDownDown_f, N_("Move battlescape camera bottom left"));	Cmd_AddCommand("-shiftleftdown", IN_ShiftLeftDownUp_f, NULL);	Cmd_AddCommand("+shiftright", IN_ShiftRightDown_f, N_("Move battlescape camera right"));	Cmd_AddCommand("-shiftright", IN_ShiftRightUp_f, NULL);	Cmd_AddCommand("+shiftrightup", IN_ShiftRightUpDown_f, N_("Move battlescape camera top right"));	Cmd_AddCommand("-shiftrightup", IN_ShiftRightUpUp_f, NULL);	Cmd_AddCommand("+shiftrightdown", IN_ShiftRightDownDown_f, N_("Move battlescape camera bottom right"));	Cmd_AddCommand("-shiftrightdown", IN_ShiftRightDownUp_f, NULL);	Cmd_AddCommand("+shiftup", IN_ShiftUpDown_f, N_("Move battlescape camera forward"));	Cmd_AddCommand("-shiftup", IN_ShiftUpUp_f, NULL);	Cmd_AddCommand("+shiftdown", IN_ShiftDownDown_f, N_("Move battlescape camera backward"));	Cmd_AddCommand("-shiftdown", IN_ShiftDownUp_f, NULL);	Cmd_AddCommand("+zoomin", IN_ZoomInDown_f, N_("Zoom in"));	Cmd_AddCommand("-zoomin", IN_ZoomInUp_f, NULL);	Cmd_AddCommand("+zoomout", IN_ZoomOutDown_f, N_("Zoom out"));	Cmd_AddCommand("-zoomout", IN_ZoomOutUp_f, NULL);	Cmd_AddCommand("+leftmouse", CL_LeftClickDown_f, N_("Left mouse button click (menu)"));	Cmd_AddCommand("-leftmouse", CL_LeftClickUp_f, NULL);	Cmd_AddCommand("+middlemouse", CL_MiddleClickDown_f, N_("Middle mouse button click (menu)"));	Cmd_AddCommand("-middlemouse", CL_MiddleClickUp_f, NULL);	Cmd_AddCommand("+rightmouse", CL_RightClickDown_f, N_("Right mouse button click (menu)"));	Cmd_AddCommand("-rightmouse", CL_RightClickUp_f, NULL);	Cmd_AddCommand("wheelupmouse", CL_WheelUp_f, N_("Mouse wheel up"));	Cmd_AddCommand("wheeldownmouse", CL_WheelDown_f, N_("Mouse wheel down"));	Cmd_AddCommand("+select", CL_SelectDown_f, N_("Select objects/Walk to a square/In fire mode, fire etc"));	Cmd_AddCommand("-select", CL_SelectUp_f, NULL);	Cmd_AddCommand("+action", CL_ActionDown_f, N_("Rotate Battlescape/In fire mode, cancel action"));	Cmd_AddCommand("-action", CL_ActionUp_f, NULL);	Cmd_AddCommand("+turn", CL_TurnDown_f, N_("Turn soldier toward mouse pointer"));	Cmd_AddCommand("-turn", CL_TurnUp_f, NULL);	Cmd_AddCommand("+hudradar", CL_HudRadarDown_f, N_("Toggles the hud radar mode"));	Cmd_AddCommand("-hudradar", CL_HudRadarUp_f, NULL);	Cmd_AddCommand("levelup", CL_LevelUp_f, N_("Slice through terrain at a higher level"));	Cmd_AddCommand("leveldown", CL_LevelDown_f, N_("Slice through terrain at a lower level"));	Cmd_AddCommand("zoominquant", CL_ZoomInQuant_f, N_("Zoom in"));	Cmd_AddCommand("zoomoutquant", CL_ZoomOutQuant_f, N_("Zoom out"));	Cmd_AddCommand("press", CL_PressKey_f, "Press a key from a command");	mousePosX = mousePosY = 0.0;	IN_StartupJoystick();}
开发者ID:ptitSeb,项目名称:UFO--AI-OpenPandora,代码行数:71,


示例17: SV_AddOperatorCommands

/*==================SV_AddOperatorCommands==================*/void SV_AddOperatorCommands( void ) {	static qboolean	initialized;	if ( initialized ) {		return;	}	initialized = qtrue;	Cmd_AddCommand ("heartbeat", SV_Heartbeat_f);	Cmd_AddCommand ("kick", SV_Kick_f);#ifdef USE_CD_KEY	Cmd_AddCommand ("banUser", SV_Ban_f);	Cmd_AddCommand ("banClient", SV_BanNum_f);#endif	// USE_CD_KEY	Cmd_AddCommand ("clientkick", SV_KickNum_f);	Cmd_AddCommand ("status", SV_Status_f);	Cmd_AddCommand ("serverinfo", SV_Serverinfo_f);	Cmd_AddCommand ("systeminfo", SV_Systeminfo_f);	Cmd_AddCommand ("dumpuser", SV_DumpUser_f);	Cmd_AddCommand ("map_restart", SV_MapRestart_f);	Cmd_AddCommand ("sectorlist", SV_SectorList_f);	Cmd_AddCommand ("map", SV_Map_f);#ifndef PRE_RELEASE_DEMO	Cmd_AddCommand ("devmap", SV_Map_f);	Cmd_AddCommand ("spmap", SV_Map_f);	Cmd_AddCommand ("spdevmap", SV_Map_f);//	Cmd_AddCommand ("devmapbsp", SV_Map_f);	// not used in MP codebase, no server BSP_cacheing	Cmd_AddCommand ("devmapmdl", SV_Map_f);	Cmd_AddCommand ("devmapall", SV_Map_f);#endif	Cmd_AddCommand ("killserver", SV_KillServer_f);//	if( com_dedicated->integer ) 	{		Cmd_AddCommand ("svsay", SV_ConSay_f);	}	Cmd_AddCommand ("forcetoggle", SV_ForceToggle_f);//JLF#ifdef _XBOX//	Cmd_AddCommand ("loadprofile", loadProfile);//	Cmd_AddCommand ("saveprofile", saveProfile);//	Cmd_AddCommand ("initprofile", initProfile);//	Cmd_AddCommand ("deleteprofile", deleteProfile);#endif}
开发者ID:Drakesinger,项目名称:jediacademypc,代码行数:54,


示例18: Key_Init

void Key_Init( void ){	Cmd_AddCommand( "bind", Key_Bind_Null_f );}
开发者ID:Kaperstone,项目名称:warsow,代码行数:4,


示例19: Cvar_Init

/*============Cvar_InitReads in all archived cvars============*/void Cvar_Init(void){    Cmd_AddCommand("set", Cvar_Set_f);    Cmd_AddCommand("cvarlist", Cvar_List_f);}
开发者ID:glampert,项目名称:quake2-for-ps2,代码行数:11,


示例20: SV_InitOperatorCommands

/** SV_InitOperatorCommands*/void SV_InitOperatorCommands( void ){	Cmd_AddCommand( "heartbeat", SV_Heartbeat_f );	Cmd_AddCommand( "status", SV_Status_f );	Cmd_AddCommand( "serverinfo", SV_Serverinfo_f );	Cmd_AddCommand( "dumpuser", SV_DumpUser_f );	Cmd_AddCommand( "map", SV_Map_f );	Cmd_AddCommand( "devmap", SV_Map_f );	Cmd_AddCommand( "gamemap", SV_Map_f );	Cmd_AddCommand( "killserver", SV_KillServer_f );	Cmd_AddCommand( "serverrecord", SV_Demo_Start_f );	Cmd_AddCommand( "serverrecordstop", SV_Demo_Stop_f );	Cmd_AddCommand( "serverrecordcancel", SV_Demo_Cancel_f );	Cmd_AddCommand( "serverrecordpurge", SV_Demo_Purge_f );	Cmd_AddCommand( "purelist", SV_PureList_f );	if( dedicated->integer )	{		Cmd_AddCommand( "autoupdate", SV_AutoUpdate_f );		Cmd_AddCommand( "autoupdatecheck", SV_AutoUpdateCheck_f );	}	Cmd_AddCommand( "cvarcheck", SV_CvarCheck_f );	Cmd_SetCompletionFunc( "map", SV_MapComplete_f );	Cmd_SetCompletionFunc( "devmap", SV_MapComplete_f );	Cmd_SetCompletionFunc( "gamemap", SV_MapComplete_f );}
开发者ID:MGXRace,项目名称:racesow,代码行数:34,


示例21: UI_RegisterAbstractNode

//.........这里部分代码省略.........	/* Background color we want to display. */	UI_RegisterNodeProperty(behaviour, "bgcolor", V_COLOR, uiNode_t, bgcolor);	/* Border color we want to display. */	UI_RegisterNodeProperty(behaviour, "bordercolor", V_COLOR, uiNode_t, bordercolor);	/*	 * Used to set the position of the node when the parent use a layout manager.	 * Else it do nothing.	 * Available values are: LAYOUTALIGN_TOPLEFT, LAYOUTALIGN_TOP, LAYOUTALIGN_TOPRIGHT,	 * LAYOUTALIGN_LEFT, LAYOUTALIGN_MIDDLE, LAYOUTALIGN_RIGHT, LAYOUTALIGN_BOTTOMLEFT,	 * LAYOUTALIGN_BOTTOM, LAYOUTALIGN_BOTTOMRIGHT, LAYOUTALIGN_FILL.	 * Allowed value depend the layout manager used. The update to date list is into	 * ui_node_panel.c	 * @image html http://ufoai.org/wiki/images/Layout.png	 */	UI_RegisterNodeProperty(behaviour, "align", V_INT, uiNode_t, align);	/*	 * Used share an int, only used by 1 behaviour	 * @todo move it to the right behaviour, delete it	 */	UI_RegisterNodeProperty(behaviour, "num", V_INT, uiNode_t, num);	/* Tooltip we want to use. */	UI_RegisterNodeProperty(behaviour, "tooltip", V_CVAR_OR_LONGSTRING, uiNode_t, tooltip);	/* Text the node will display.	 */	UI_RegisterNodeProperty(behaviour, "string", V_CVAR_OR_LONGSTRING, uiNode_t, text);	/* Text font the node will use.	 * @todo use V_REF_OF_STRING when its possible ('font' is never a cvar).	 */	UI_RegisterNodeProperty(behaviour, "font", V_CVAR_OR_STRING, uiNode_t, font);	/* Text color the node will use. */	UI_RegisterNodeProperty(behaviour, "color", V_COLOR, uiNode_t, color);	/* Text color the node will use when something is selected. */	UI_RegisterNodeProperty(behaviour, "selectcolor", V_COLOR, uiNode_t, selectedColor);	/* Flashing color */	UI_RegisterNodeProperty(behaviour, "flashcolor", V_COLOR, uiNode_t, flashColor);	/* Alignement of the text into the node, or elements into blocks. */	UI_RegisterNodeProperty(behaviour, "contentalign", V_UI_ALIGN, uiNode_t, contentAlign);	/* When <code>invis</code> property is false (default value);	 * this condition say if the node is visible or not. It use a script expression.	 */	UI_RegisterNodeProperty(behaviour, "visiblewhen", V_UI_IF, uiNode_t, visibilityCondition);	/* Called when the user click with left button into the node. */	UI_RegisterNodeProperty(behaviour, "onclick", V_UI_ACTION, uiNode_t, onClick);	/* Called when the user click with right button into the node. */	UI_RegisterNodeProperty(behaviour, "onrclick", V_UI_ACTION, uiNode_t, onRightClick);	/* Called when the user click with middle button into the node. */	UI_RegisterNodeProperty(behaviour, "onmclick", V_UI_ACTION, uiNode_t, onMiddleClick);	/* Called when the user use the mouse wheel over the node. */	UI_RegisterNodeProperty(behaviour, "onwheel", V_UI_ACTION, uiNode_t, onWheel);	/* Called when the user use the mouse wheel up over the node. */	UI_RegisterNodeProperty(behaviour, "onwheelup", V_UI_ACTION, uiNode_t, onWheelUp);	/* Called when the user use the mouse wheel down over the node. */	UI_RegisterNodeProperty(behaviour, "onwheeldown", V_UI_ACTION, uiNode_t, onWheelDown);	/* Called when the mouse enter over the node. */	UI_RegisterNodeProperty(behaviour, "onmouseenter", V_UI_ACTION, uiNode_t, onMouseEnter);	/* Called when the mouse go out of the node. */	UI_RegisterNodeProperty(behaviour, "onmouseleave", V_UI_ACTION, uiNode_t, onMouseLeave);	/* Called when the internal content of the nde change. Each behaviour use it how they need it.	 * @todo Move it where it is need.	 */	UI_RegisterNodeProperty(behaviour, "onchange", V_UI_ACTION, uiNode_t, onChange);	/* Special attribute only use into the node description to exclude part of the node	 * (see also <code>ghost</code>). Rectangle position is relative to the node. */	UI_RegisterNodeProperty(behaviour, "excluderect", V_UI_EXCLUDERECT, uiNode_t, firstExcludeRect);	/* Remove all child from the node (only dynamic allocated nodes). */	UI_RegisterNodeMethod(behaviour, "removeallchild", UI_AbstractNodeCallRemovaAllChild);	/* Create a new child with name and type. */	UI_RegisterNodeMethod(behaviour, "createchild", UI_AbstractNodeCallCreateChild);	/* Delete the node and remove it from his parent. */	UI_RegisterNodeMethod(behaviour, "delete", UI_AbstractNodeCallDelete);	/* Delete the node in x ms and remove it from his parent. */	UI_RegisterNodeMethod(behaviour, "deletetimed", UI_AbstractNodeCallDeleteTimed);	/** @todo move it into common? */	Com_RegisterConstInt("ALIGN_UL", ALIGN_UL);	Com_RegisterConstInt("ALIGN_UC", ALIGN_UC);	Com_RegisterConstInt("ALIGN_UR", ALIGN_UR);	Com_RegisterConstInt("ALIGN_CL", ALIGN_CL);	Com_RegisterConstInt("ALIGN_CC", ALIGN_CC);	Com_RegisterConstInt("ALIGN_CR", ALIGN_CR);	Com_RegisterConstInt("ALIGN_LL", ALIGN_LL);	Com_RegisterConstInt("ALIGN_LC", ALIGN_LC);	Com_RegisterConstInt("ALIGN_LR", ALIGN_LR);	/* some commands */#ifdef DEBUG	Cmd_AddCommand("debug_mnsetnodeproperty", UI_NodeSetProperty_f, "Set a node property");	Cmd_AddCommand("debug_mngetnodeproperty", UI_NodeGetProperty_f, "Get a node property");#endif}
开发者ID:cigo,项目名称:ufoai,代码行数:101,


示例22: CL_AddCgameCommand

/*=====================CL_AddCgameCommand=====================*/void CL_AddCgameCommand( const char *cmdName ) {	Cmd_AddCommand( cmdName, NULL );}
开发者ID:br0k3,项目名称:urban-terror-hack,代码行数:8,


示例23: STATS_InitStartup

void STATS_InitStartup (void){#ifdef DEBUG	Cmd_AddCommand("debug_listcampaign", CP_CampaignStats_f, "Print campaign stats to game console");#endif}
开发者ID:ptitSeb,项目名称:UFO--AI-OpenPandora,代码行数:6,


示例24: Sbar_Init

/*===============Sbar_Init===============*/voidSbar_Init(void){    int i;    for (i = 0; i < 10; i++) {	sb_nums[0][i] = Draw_PicFromWad(va("num_%i", i));	sb_nums[1][i] = Draw_PicFromWad(va("anum_%i", i));    }    sb_nums[0][10] = Draw_PicFromWad("num_minus");    sb_nums[1][10] = Draw_PicFromWad("anum_minus");    sb_colon = Draw_PicFromWad("num_colon");    sb_slash = Draw_PicFromWad("num_slash");    sb_weapons[0][0] = Draw_PicFromWad("inv_shotgun");    sb_weapons[0][1] = Draw_PicFromWad("inv_sshotgun");    sb_weapons[0][2] = Draw_PicFromWad("inv_nailgun");    sb_weapons[0][3] = Draw_PicFromWad("inv_snailgun");    sb_weapons[0][4] = Draw_PicFromWad("inv_rlaunch");    sb_weapons[0][5] = Draw_PicFromWad("inv_srlaunch");    sb_weapons[0][6] = Draw_PicFromWad("inv_lightng");    sb_weapons[1][0] = Draw_PicFromWad("inv2_shotgun");    sb_weapons[1][1] = Draw_PicFromWad("inv2_sshotgun");    sb_weapons[1][2] = Draw_PicFromWad("inv2_nailgun");    sb_weapons[1][3] = Draw_PicFromWad("inv2_snailgun");    sb_weapons[1][4] = Draw_PicFromWad("inv2_rlaunch");    sb_weapons[1][5] = Draw_PicFromWad("inv2_srlaunch");    sb_weapons[1][6] = Draw_PicFromWad("inv2_lightng");    for (i = 0; i < 5; i++) {	sb_weapons[2 + i][0] = Draw_PicFromWad(va("inva%i_shotgun", i + 1));	sb_weapons[2 + i][1] = Draw_PicFromWad(va("inva%i_sshotgun", i + 1));	sb_weapons[2 + i][2] = Draw_PicFromWad(va("inva%i_nailgun", i + 1));	sb_weapons[2 + i][3] = Draw_PicFromWad(va("inva%i_snailgun", i + 1));	sb_weapons[2 + i][4] = Draw_PicFromWad(va("inva%i_rlaunch", i + 1));	sb_weapons[2 + i][5] = Draw_PicFromWad(va("inva%i_srlaunch", i + 1));	sb_weapons[2 + i][6] = Draw_PicFromWad(va("inva%i_lightng", i + 1));    }    sb_ammo[0] = Draw_PicFromWad("sb_shells");    sb_ammo[1] = Draw_PicFromWad("sb_nails");    sb_ammo[2] = Draw_PicFromWad("sb_rocket");    sb_ammo[3] = Draw_PicFromWad("sb_cells");    sb_armor[0] = Draw_PicFromWad("sb_armor1");    sb_armor[1] = Draw_PicFromWad("sb_armor2");    sb_armor[2] = Draw_PicFromWad("sb_armor3");    sb_items[0] = Draw_PicFromWad("sb_key1");    sb_items[1] = Draw_PicFromWad("sb_key2");    sb_items[2] = Draw_PicFromWad("sb_invis");    sb_items[3] = Draw_PicFromWad("sb_invuln");    sb_items[4] = Draw_PicFromWad("sb_suit");    sb_items[5] = Draw_PicFromWad("sb_quad");    sb_sigil[0] = Draw_PicFromWad("sb_sigil1");    sb_sigil[1] = Draw_PicFromWad("sb_sigil2");    sb_sigil[2] = Draw_PicFromWad("sb_sigil3");    sb_sigil[3] = Draw_PicFromWad("sb_sigil4");    sb_faces[4][0] = Draw_PicFromWad("face1");    sb_faces[4][1] = Draw_PicFromWad("face_p1");    sb_faces[3][0] = Draw_PicFromWad("face2");    sb_faces[3][1] = Draw_PicFromWad("face_p2");    sb_faces[2][0] = Draw_PicFromWad("face3");    sb_faces[2][1] = Draw_PicFromWad("face_p3");    sb_faces[1][0] = Draw_PicFromWad("face4");    sb_faces[1][1] = Draw_PicFromWad("face_p4");    sb_faces[0][0] = Draw_PicFromWad("face5");    sb_faces[0][1] = Draw_PicFromWad("face_p5");    sb_face_invis = Draw_PicFromWad("face_invis");    sb_face_invuln = Draw_PicFromWad("face_invul2");    sb_face_invis_invuln = Draw_PicFromWad("face_inv2");    sb_face_quad = Draw_PicFromWad("face_quad");    Cmd_AddCommand("+showscores", Sbar_ShowScores);    Cmd_AddCommand("-showscores", Sbar_DontShowScores);    Cmd_AddCommand("+showteamscores", Sbar_ShowTeamScores);    Cmd_AddCommand("-showteamscores", Sbar_DontShowTeamScores);    sb_sbar = Draw_PicFromWad("sbar");    sb_ibar = Draw_PicFromWad("ibar");    sb_scorebar = Draw_PicFromWad("scorebar");}
开发者ID:leilei-,项目名称:tyrquake,代码行数:94,


示例25: CL_InitLocal

/*=================CL_InitLocal=================*/void CL_InitLocal( void ){	cls.state = ca_disconnected;	// register our variables	cl_predict = Cvar_Get( "cl_predict", "0", CVAR_ARCHIVE, "disables client movement prediction" );	cl_crosshair = Cvar_Get( "crosshair", "1", CVAR_ARCHIVE, "show weapon chrosshair" );	cl_nodelta = Cvar_Get ("cl_nodelta", "0", 0, "disable delta-compression for usercommnds" );	cl_idealpitchscale = Cvar_Get( "cl_idealpitchscale", "0.8", 0, "how much to look up/down slopes and stairs when not using freelook" );	cl_solid_players = Cvar_Get( "cl_solid_players", "1", 0, "Make all players not solid (can't traceline them)" );	cl_interp = Cvar_Get( "ex_interp", "0.1", 0, "Interpolate object positions starting this many seconds in past" ); 	cl_timeout = Cvar_Get( "cl_timeout", "60", 0, "connect timeout (in-seconds)" );	rcon_client_password = Cvar_Get( "rcon_password", "", 0, "remote control client password" );	rcon_address = Cvar_Get( "rcon_address", "", 0, "remote control address" );	// userinfo	Cvar_Get( "password", "", CVAR_USERINFO, "player password" );	name = Cvar_Get( "name", Sys_GetCurrentUser(), CVAR_USERINFO|CVAR_ARCHIVE|CVAR_PRINTABLEONLY, "player name" );	model = Cvar_Get( "model", "player", CVAR_USERINFO|CVAR_ARCHIVE, "player model ('player' it's a single player model)" );	topcolor = Cvar_Get( "topcolor", "0", CVAR_USERINFO|CVAR_ARCHIVE, "player top color" );	bottomcolor = Cvar_Get( "bottomcolor", "0", CVAR_USERINFO|CVAR_ARCHIVE, "player bottom color" );	rate = Cvar_Get( "rate", "25000", CVAR_USERINFO|CVAR_ARCHIVE, "player network rate" );	hltv = Cvar_Get( "hltv", "0", CVAR_USERINFO|CVAR_LATCH, "HLTV mode" );	cl_showfps = Cvar_Get( "cl_showfps", "1", CVAR_ARCHIVE, "show client fps" );	cl_smooth = Cvar_Get ("cl_smooth", "0", CVAR_ARCHIVE, "smooth up stair climbing and interpolate position in multiplayer" );	cl_cmdbackup = Cvar_Get( "cl_cmdbackup", "10", CVAR_ARCHIVE, "how many additional history commands are sent" );	cl_cmdrate = Cvar_Get( "cl_cmdrate", "30", CVAR_ARCHIVE, "Max number of command packets sent to server per second" );	cl_draw_particles = Cvar_Get( "cl_draw_particles", "1", CVAR_ARCHIVE, "Disable any particle effects" );	cl_draw_beams = Cvar_Get( "cl_draw_beams", "1", CVAR_ARCHIVE, "Disable view beams" );	cl_lightstyle_lerping = Cvar_Get( "cl_lightstyle_lerping", "0", CVAR_ARCHIVE, "enables animated light lerping (perfomance option)" );	Cvar_Get( "hud_scale", "0", CVAR_ARCHIVE|CVAR_LATCH, "scale hud at current resolution" );	Cvar_Get( "skin", "", CVAR_USERINFO, "player skin" ); // XDM 3.3 want this cvar	Cvar_Get( "cl_updaterate", "60", CVAR_USERINFO|CVAR_ARCHIVE, "refresh rate of server messages" );	Cvar_Get( "cl_background", "0", CVAR_READ_ONLY, "indicate what background map is running" );	// these two added to shut up CS 1.5 about 'unknown' commands	Cvar_Get( "lightgamma", "1", CVAR_ARCHIVE, "ambient lighting level (legacy, unused)" );	Cvar_Get( "direct", "1", CVAR_ARCHIVE, "direct lighting level (legacy, unused)" );	Cvar_Get( "voice_serverdebug", "0", 0, "debug voice (legacy, unused)" );	// interpolation cvars	Cvar_Get( "ex_interp", "0", 0, "" );	Cvar_Get( "ex_maxerrordistance", "0", 0, "" );	// server commands	Cmd_AddCommand ("noclip", NULL, "enable or disable no clipping mode" );	Cmd_AddCommand ("notarget", NULL, "notarget mode (monsters do not see you)" );	Cmd_AddCommand ("fullupdate", NULL, "re-init HUD on start demo recording" );	Cmd_AddCommand ("give", NULL, "give specified item or weapon" );	Cmd_AddCommand ("drop", NULL, "drop current/specified item or weapon" );	Cmd_AddCommand ("gametitle", NULL, "show game logo" );	Cmd_AddCommand ("god", NULL, "enable godmode" );	Cmd_AddCommand ("fov", NULL, "set client field of view" );			// register our commands	Cmd_AddCommand ("pause", NULL, "pause the game (if the server allows pausing)" );	Cmd_AddCommand ("localservers", CL_LocalServers_f, "collect info about local servers" );	Cmd_AddCommand ("internetservers", CL_InternetServers_f, "collect info about internet servers" );	Cmd_AddCommand ("cd", CL_PlayCDTrack_f, "Play cd-track (not real cd-player of course)" );	Cmd_AddCommand ("userinfo", CL_Userinfo_f, "print current client userinfo" );	Cmd_AddCommand ("physinfo", CL_Physinfo_f, "print current client physinfo" );	Cmd_AddCommand ("disconnect", CL_Disconnect_f, "disconnect from server" );	Cmd_AddCommand ("record", CL_Record_f, "record a demo" );	Cmd_AddCommand ("playdemo", CL_PlayDemo_f, "playing a demo" );	Cmd_AddCommand ("killdemo", CL_DeleteDemo_f, "delete a specified demo file and demoshot" );	Cmd_AddCommand ("startdemos", CL_StartDemos_f, "start playing back the selected demos sequentially" );	Cmd_AddCommand ("demos", CL_Demos_f, "restart looping demos defined by the last startdemos command" );	Cmd_AddCommand ("movie", CL_PlayVideo_f, "playing a movie" );	Cmd_AddCommand ("stop", CL_Stop_f, "stop playing or recording a demo" );	Cmd_AddCommand ("info", NULL, "collect info about local servers with specified protocol" );	Cmd_AddCommand ("escape", CL_Escape_f, "escape from game to menu" );	Cmd_AddCommand ("pointfile", CL_ReadPointFile_f, "show leaks on a map (if present of course)" );	Cmd_AddCommand ("linefile", CL_ReadLineFile_f, "show leaks on a map (if present of course)" );		Cmd_AddCommand ("quit", CL_Quit_f, "quit from game" );	Cmd_AddCommand ("exit", CL_Quit_f, "quit from game" );	Cmd_AddCommand ("screenshot", CL_ScreenShot_f, "takes a screenshot of the next rendered frame" );	Cmd_AddCommand ("snapshot", CL_SnapShot_f, "takes a snapshot of the next rendered frame" );	Cmd_AddCommand ("envshot", CL_EnvShot_f, "takes a six-sides cubemap shot with specified name" );	Cmd_AddCommand ("skyshot", CL_SkyShot_f, "takes a six-sides envmap (skybox) shot with specified name" );	Cmd_AddCommand ("levelshot", CL_LevelShot_f, "same as /"screenshot/", used for create plaque images" );	Cmd_AddCommand ("saveshot", CL_SaveShot_f, "used for create save previews with LoadGame menu" );	Cmd_AddCommand ("demoshot", CL_DemoShot_f, "used for create demo previews with PlayDemo menu" );	Cmd_AddCommand ("connect", CL_Connect_f, "connect to a server by hostname" );	Cmd_AddCommand ("reconnect", CL_Reconnect_f, "reconnect to current level" );	Cmd_AddCommand ("rcon", CL_Rcon_f, "sends a command to the server console (rcon_password and rcon_address required)" );	// this is dangerous to leave in// 	Cmd_AddCommand ("packet", CL_Packet_f, "send a packet with custom contents" );//.........这里部分代码省略.........
开发者ID:aktel,项目名称:surface_multiplayer,代码行数:101,


示例26: SV_AddOperatorCommands

/*==================SV_AddOperatorCommands==================*/void SV_AddOperatorCommands(void) {	static qboolean* initialized = (qboolean*)0x8160680;		if(*initialized)		return;			*initialized = qtrue;		Cmd_AddCommand("heartbeat", SV_Heartbeat_f);		Cmd_AddCommand("kick", SV_Kick_f);	Cmd_AddCommand("ban", SV_Ban_f);		Cmd_AddCommand("reloadbans", X_ReadBannedList_sub);		Cmd_AddCommand("clientkick", SV_KickNum_f);	Cmd_AddCommand("clientban", SV_BanNum_f);		Cmd_AddCommand("banip", SV_BanIP_f);	Cmd_AddCommand("banguid", SV_BanGUID_f);		Cmd_AddCommand("unbanguid", SV_UnbanGUID_f);	Cmd_AddCommand("unbanip", SV_UnbanIP_f);		Cmd_AddCommand("status", SV_Status_f);	Cmd_AddCommand("xstatus", SV_XStatus_f);	Cmd_AddCommand("serverinfo", SV_ServerInfo_f);	Cmd_AddCommand("systeminfo", SV_SystemInfo_f);	Cmd_AddCommand("dumpuser", SV_DumpUser_f);	Cmd_AddCommand("map_restart", SV_MapRestart_f);	Cmd_AddCommand("map", SV_Map_f);	Cmd_AddCommand("devmap", SV_Map_f);	Cmd_AddCommand("map_rotate", SV_MapRotate_f);	Cmd_AddCommand("gameCompleteStatus", SV_GameCompleteStatus_f);	Cmd_AddCommand("killserver", SV_KillServer_f);	Cmd_AddCommand("scriptUsage", SV_ScriptUsage_f);	Cmd_AddCommand("stringUsage", SV_StringUsage_f);	Cmd_AddCommand("cs", Cmd_GetConfigstrings);	Cmd_AddCommand("setcs", Cmd_SetConfigstring);		Cmd_AddCommand("codextended", SV_Version);	Cmd_AddCommand("xtnded", SV_Version);	#ifdef xDEBUG	Cmd_AddCommand("trap", SV_Test);	Cmd_AddCommand("net", band_test);	#endif	Cmd_AddCommand("say", SV_Say_f);}
开发者ID:AnasBunny,项目名称:CoDExtended,代码行数:53,


示例27: Sys_Init

/*=================Sys_Init=================*/void Sys_Init(void){	Cmd_AddCommand( "in_restart", Sys_In_Restart_f );	Cvar_Set( "arch", OS_STRING " " ARCH_STRING );	Cvar_Set( "username", Sys_GetCurrentUser( ) );}
开发者ID:BruceJohnJennerLawso,项目名称:quake3,代码行数:11,


示例28: R_Modules_Init

void R_Modules_Init(void){	Cmd_AddCommand("r_restart", R_Modules_Restart, "restarts renderer");}
开发者ID:Blub,项目名称:darkplaces,代码行数:4,


示例29: CL_InitInput

/*============CL_InitInput============*/void CL_InitInput( void ) {	Cmd_AddCommand ("centerview",IN_CenterView);	Cmd_AddCommand ("+moveup",IN_UpDown);	Cmd_AddCommand ("-moveup",IN_UpUp);	Cmd_AddCommand ("+movedown",IN_DownDown);	Cmd_AddCommand ("-movedown",IN_DownUp);	Cmd_AddCommand ("+left",IN_LeftDown);	Cmd_AddCommand ("-left",IN_LeftUp);	Cmd_AddCommand ("+right",IN_RightDown);	Cmd_AddCommand ("-right",IN_RightUp);	Cmd_AddCommand ("+forward",IN_ForwardDown);	Cmd_AddCommand ("-forward",IN_ForwardUp);	Cmd_AddCommand ("+back",IN_BackDown);	Cmd_AddCommand ("-back",IN_BackUp);	Cmd_AddCommand ("+lookup", IN_LookupDown);	Cmd_AddCommand ("-lookup", IN_LookupUp);	Cmd_AddCommand ("+lookdown", IN_LookdownDown);	Cmd_AddCommand ("-lookdown", IN_LookdownUp);	Cmd_AddCommand ("+strafe", IN_StrafeDown);	Cmd_AddCommand ("-strafe", IN_StrafeUp);	Cmd_AddCommand ("+moveleft", IN_MoveleftDown);	Cmd_AddCommand ("-moveleft", IN_MoveleftUp);	Cmd_AddCommand ("+moveright", IN_MoverightDown);	Cmd_AddCommand ("-moveright", IN_MoverightUp);	Cmd_AddCommand ("+speed", IN_SpeedDown);	Cmd_AddCommand ("-speed", IN_SpeedUp);	Cmd_AddCommand ("useGivenForce", IN_UseGivenForce);	//buttons	Cmd_AddCommand ("+attack", IN_Button0Down);//attack	Cmd_AddCommand ("-attack", IN_Button0Up);	Cmd_AddCommand ("+force_lightning", IN_Button1Down);//force lightning	Cmd_AddCommand ("-force_lightning", IN_Button1Up);	Cmd_AddCommand ("+useforce", IN_Button2Down);	//use current force power	Cmd_AddCommand ("-useforce", IN_Button2Up);#ifndef __NO_JK2	if ( com_jk2 && com_jk2->integer ) {		Cmd_AddCommand ("+block", IN_Button3Down);//manual blocking		Cmd_AddCommand ("-block", IN_Button3Up);	}	else {		Cmd_AddCommand ("+force_drain", IN_Button3Down);//force drain		Cmd_AddCommand ("-force_drain", IN_Button3Up);	}#else	Cmd_AddCommand ("+force_drain", IN_Button3Down);//force drain	Cmd_AddCommand ("-force_drain", IN_Button3Up);#endif	Cmd_AddCommand ("+walk", IN_Button4Down);//walking	Cmd_AddCommand ("-walk", IN_Button4Up);	Cmd_AddCommand ("+use", IN_Button5Down);//use object	Cmd_AddCommand ("-use", IN_Button5Up);	Cmd_AddCommand ("+force_grip", IN_Button6Down);//force jump	Cmd_AddCommand ("-force_grip", IN_Button6Up);	Cmd_AddCommand ("+altattack", IN_Button7Down);//altattack	Cmd_AddCommand ("-altattack", IN_Button7Up);#ifndef __NO_JK2	if ( !com_jk2 || !com_jk2->integer ) {		Cmd_AddCommand ("+forcefocus", IN_Button8Down);//special saber attacks		Cmd_AddCommand ("-forcefocus", IN_Button8Up);		Cmd_AddCommand ("+block", IN_Button8Down);//manual blocking		Cmd_AddCommand ("-block", IN_Button8Up);	}#else	Cmd_AddCommand ("+forcefocus", IN_Button8Down);//special saber attacks	Cmd_AddCommand ("-forcefocus", IN_Button8Up);	Cmd_AddCommand ("+block", IN_Button8Down);//manual blocking	Cmd_AddCommand ("-block", IN_Button8Up);#endif	Cmd_AddCommand ("+button0", IN_Button0Down);	Cmd_AddCommand ("-button0", IN_Button0Up);	Cmd_AddCommand ("+button1", IN_Button1Down);	Cmd_AddCommand ("-button1", IN_Button1Up);	Cmd_AddCommand ("+button2", IN_Button2Down);	Cmd_AddCommand ("-button2", IN_Button2Up);	Cmd_AddCommand ("+button3", IN_Button3Down);	Cmd_AddCommand ("-button3", IN_Button3Up);	Cmd_AddCommand ("+button4", IN_Button4Down);	Cmd_AddCommand ("-button4", IN_Button4Up);	Cmd_AddCommand ("+button5", IN_Button5Down);	Cmd_AddCommand ("-button5", IN_Button5Up);	Cmd_AddCommand ("+button6", IN_Button6Down);	Cmd_AddCommand ("-button6", IN_Button6Up);	Cmd_AddCommand ("+button7", IN_Button7Down);	Cmd_AddCommand ("-button7", IN_Button7Up);	Cmd_AddCommand ("+button8", IN_Button8Down);	Cmd_AddCommand ("-button8", IN_Button8Up);	Cmd_AddCommand ("+button9", IN_Button9Down);	Cmd_AddCommand ("-button9", IN_Button9Up);	Cmd_AddCommand ("+button10", IN_Button10Down);	Cmd_AddCommand ("-button10", IN_Button10Up);	Cmd_AddCommand ("+button11", IN_Button11Down);	Cmd_AddCommand ("-button11", IN_Button11Up);	Cmd_AddCommand ("+button12", IN_Button12Down);//.........这里部分代码省略.........
开发者ID:Malchio,项目名称:OpenJK,代码行数:101,



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


C++ Cmd_Argc函数代码示例
C++ CmdGenericPtr函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。