void G_InitActions(void) { dmemset(AllActions, 0, NUM_ACTIONS); KeyActions = AllActions + KEY_ACTIONPOS; MouseActions = AllActions + MOUSE_ACTIONPOS; Mouse2Actions = AllActions + MOUSE2_ACTIONPOS; dmemset(CurrentActions, 0, MAX_CURRENTACTIONS*sizeof(alist_t *)); G_AddCommand("alias", CMD_Alias, 0); G_AddCommand("unbind", CMD_Unbind, 0); G_AddCommand("unbindall", CMD_UnbindAll, 0); }
void CON_CvarInit(void) { AM_RegisterCvars(); R_RegisterCvars(); V_RegisterCvars(); ST_RegisterCvars(); S_RegisterCvars(); I_RegisterCvars(); M_RegisterCvars(); P_RegisterCvars(); G_RegisterCvars(); G_AddCommand("listcvars", CMD_ListCvars, 0); }
static CMD(Alias) { alist_t *al; if(!param[0]) { I_Printf("Current Aliases:\n"); G_ShowAliases(Actions); return; } al = ParseActions(param[1]); if(!al) G_UnregisterAction(param[0]); else G_AddCommand(param[0], G_RunAlias, (int64)al); }
/* * G_InitGameCommands */ void G_InitGameCommands( void ) { int i; for( i = 0; i < MAX_GAMECOMMANDS; i++ ) { g_Commands[i].func = NULL; g_Commands[i].name[0] = 0; } G_AddCommand( "cvarinfo", Cmd_CvarInfo_f ); G_AddCommand( "position", Cmd_Position_f ); G_AddCommand( "players", Cmd_Players_f ); G_AddCommand( "spectators", Cmd_Spectators_f ); G_AddCommand( "stats", Cmd_ShowStats_f ); G_AddCommand( "say", Cmd_SayCmd_f ); G_AddCommand( "say_team", Cmd_SayTeam_f ); G_AddCommand( "svscore", Cmd_Score_f ); G_AddCommand( "god", Cmd_God_f ); G_AddCommand( "noclip", Cmd_Noclip_f ); G_AddCommand( "use", Cmd_Use_f ); G_AddCommand( "give", Cmd_Give_f ); G_AddCommand( "kill", Cmd_Kill_f ); G_AddCommand( "putaway", Cmd_PutAway_f ); G_AddCommand( "chase", Cmd_ChaseCam_f ); G_AddCommand( "chasenext", Cmd_ChaseNext_f ); G_AddCommand( "chaseprev", Cmd_ChasePrev_f ); G_AddCommand( "spec", Cmd_Spec_f ); G_AddCommand( "enterqueue", G_Teams_JoinChallengersQueue ); G_AddCommand( "leavequeue", G_Teams_LeaveChallengersQueue ); G_AddCommand( "camswitch", Cmd_SwitchChaseCamMode_f ); G_AddCommand( "timeout", Cmd_Timeout_f ); G_AddCommand( "timein", Cmd_Timein_f ); G_AddCommand( "cointoss", Cmd_CoinToss_f ); G_AddCommand( "whois", Cmd_Whois_f ); // callvotes commands G_AddCommand( "callvote", G_CallVote_Cmd ); G_AddCommand( "vote", G_CallVotes_CmdVote ); G_AddCommand( "opcall", G_OperatorVote_Cmd ); G_AddCommand( "operator", Cmd_GameOperator_f ); G_AddCommand( "op", Cmd_GameOperator_f ); // teams commands G_AddCommand( "ready", G_Match_Ready ); G_AddCommand( "unready", G_Match_NotReady ); G_AddCommand( "notready", G_Match_NotReady ); G_AddCommand( "toggleready", G_Match_ToggleReady ); G_AddCommand( "join", Cmd_Join_f ); // coach commands G_AddCommand( "coach", G_Teams_Coach ); G_AddCommand( "lockteam", G_Teams_CoachLockTeam ); G_AddCommand( "unlockteam", G_Teams_CoachUnLockTeam ); G_AddCommand( "invite", G_Teams_Invite_f ); G_AddCommand( "vsay", G_vsay_Cmd ); G_AddCommand( "vsay_team", G_Teams_vsay_Cmd ); // bot commands G_AddCommand( "showclosestnode", Cmd_ShowPLinks_f ); G_AddCommand( "deleteclosestnode", Cmd_deleteClosestNode_f ); G_AddCommand( "botnotarget", AI_Cheat_NoTarget ); // ch : added awards G_AddCommand ( "awards", Cmd_Awards_f ); // TV G_AddCommand( "tvconnect", Cmd_TVConnect_f ); }
void G_Init(void) { G_ReloadDefaults(); G_InitActions(); dmemset(playeringame, 0, sizeof(playeringame)); G_ClearInput(); G_AddCommand("+fire", CMD_Button, PCKEY_ATTACK); G_AddCommand("-fire", CMD_Button, PCKEY_ATTACK|PCKF_UP); G_AddCommand("+strafe", CMD_Button, PCKEY_STRAFE); G_AddCommand("-strafe", CMD_Button, PCKEY_STRAFE|PCKF_UP); G_AddCommand("+use", CMD_Button, PCKEY_USE); G_AddCommand("-use", CMD_Button, PCKEY_USE|PCKF_UP); G_AddCommand("+run", CMD_Button, PCKEY_RUN); G_AddCommand("-run", CMD_Button, PCKEY_RUN|PCKF_UP); G_AddCommand("+jump", CMD_Button, PCKEY_JUMP); G_AddCommand("-jump", CMD_Button, PCKEY_JUMP|PCKF_UP); G_AddCommand("weapon", CMD_Weapon, 0); G_AddCommand("nextweap", CMD_NextWeapon, 0); G_AddCommand("prevweap", CMD_PrevWeapon, 0); G_AddCommand("+forward", CMD_Button, PCKEY_FORWARD); G_AddCommand("-forward", CMD_Button, PCKEY_FORWARD|PCKF_UP); G_AddCommand("+back", CMD_Button, PCKEY_BACK); G_AddCommand("-back", CMD_Button, PCKEY_BACK|PCKF_UP); G_AddCommand("+left", CMD_Button, PCKEY_LEFT); G_AddCommand("-left", CMD_Button, PCKEY_LEFT|PCKF_UP); G_AddCommand("+right", CMD_Button, PCKEY_RIGHT); G_AddCommand("-right", CMD_Button, PCKEY_RIGHT|PCKF_UP); G_AddCommand("+lookup", CMD_Button, PCKEY_LOOKUP); G_AddCommand("-lookup", CMD_Button, PCKEY_LOOKUP|PCKF_UP); G_AddCommand("+lookdown", CMD_Button, PCKEY_LOOKDOWN); G_AddCommand("-lookdown", CMD_Button, PCKEY_LOOKDOWN|PCKF_UP); G_AddCommand("+center", CMD_Button, PCKEY_CENTER); G_AddCommand("-center", CMD_Button, PCKEY_CENTER|PCKF_UP); G_AddCommand("autorun", CMD_Autorun, 0); G_AddCommand("+strafeleft", CMD_Button, PCKEY_STRAFELEFT); G_AddCommand("-strafeleft", CMD_Button, PCKEY_STRAFELEFT|PCKF_UP); G_AddCommand("+straferight", CMD_Button, PCKEY_STRAFERIGHT); G_AddCommand("-straferight", CMD_Button, PCKEY_STRAFERIGHT|PCKF_UP); G_AddCommand("bind", CMD_Bind, 0); G_AddCommand("seta", CMD_Seta, 0); G_AddCommand("quit", CMD_Quit, 0); G_AddCommand("exec", CMD_Exec, 0); G_AddCommand("listcmd", CMD_List, 0); G_AddCommand("god", CMD_Cheat, 0); G_AddCommand("noclip", CMD_Cheat, 1); G_AddCommand("give", CMD_Cheat, 2); G_AddCommand("killall", CMD_Cheat, 3); G_AddCommand("mapall", CMD_Cheat, 4); G_AddCommand("pause", CMD_Pause, 0); G_AddCommand("spawnthing", CMD_SpawnThing, 0); G_AddCommand("exitlevel", CMD_ExitLevel, 0); G_AddCommand("trigger", CMD_TriggerSpecial, 0); G_AddCommand("setcamerastatic", CMD_PlayerCamera, 0); G_AddCommand("setcamerachase", CMD_PlayerCamera, 1); G_AddCommand("enddemo", CMD_EndDemo, 0); }