MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CL_InitInput

Function CL_InitInput

code/client/cl_input.cpp:940–1038  ·  view source on GitHub ↗

============ CL_InitInput ============ */

Source from the content-addressed store, hash-verified

938============
939*/
940void CL_InitInput( void ) {
941 Cmd_AddCommand ("centerview",IN_CenterView);
942
943 Cmd_AddCommand ("+moveup",IN_UpDown);
944 Cmd_AddCommand ("-moveup",IN_UpUp);
945 Cmd_AddCommand ("+movedown",IN_DownDown);
946 Cmd_AddCommand ("-movedown",IN_DownUp);
947 Cmd_AddCommand ("+left",IN_LeftDown);
948 Cmd_AddCommand ("-left",IN_LeftUp);
949 Cmd_AddCommand ("+right",IN_RightDown);
950 Cmd_AddCommand ("-right",IN_RightUp);
951 Cmd_AddCommand ("+forward",IN_ForwardDown);
952 Cmd_AddCommand ("-forward",IN_ForwardUp);
953 Cmd_AddCommand ("+back",IN_BackDown);
954 Cmd_AddCommand ("-back",IN_BackUp);
955 Cmd_AddCommand ("+lookup", IN_LookupDown);
956 Cmd_AddCommand ("-lookup", IN_LookupUp);
957 Cmd_AddCommand ("+lookdown", IN_LookdownDown);
958 Cmd_AddCommand ("-lookdown", IN_LookdownUp);
959 Cmd_AddCommand ("+strafe", IN_StrafeDown);
960 Cmd_AddCommand ("-strafe", IN_StrafeUp);
961 Cmd_AddCommand ("+moveleft", IN_MoveleftDown);
962 Cmd_AddCommand ("-moveleft", IN_MoveleftUp);
963 Cmd_AddCommand ("+moveright", IN_MoverightDown);
964 Cmd_AddCommand ("-moveright", IN_MoverightUp);
965 Cmd_AddCommand ("+speed", IN_SpeedDown);
966 Cmd_AddCommand ("-speed", IN_SpeedUp);
967 Cmd_AddCommand ("useGivenForce", IN_UseGivenForce);
968 //buttons
969 Cmd_AddCommand ("+attack", IN_Button0Down);//attack
970 Cmd_AddCommand ("-attack", IN_Button0Up);
971 Cmd_AddCommand ("+force_lightning", IN_Button1Down);//force lightning
972 Cmd_AddCommand ("-force_lightning", IN_Button1Up);
973 Cmd_AddCommand ("+useforce", IN_Button2Down); //use current force power
974 Cmd_AddCommand ("-useforce", IN_Button2Up);
975#ifdef JK2_MODE
976 Cmd_AddCommand ("+block", IN_Button3Down);//manual blocking
977 Cmd_AddCommand ("-block", IN_Button3Up);
978#else
979 Cmd_AddCommand ("+force_drain", IN_Button3Down);//force drain
980 Cmd_AddCommand ("-force_drain", IN_Button3Up);
981#endif
982 Cmd_AddCommand ("+walk", IN_Button4Down);//walking
983 Cmd_AddCommand ("-walk", IN_Button4Up);
984 Cmd_AddCommand ("+use", IN_Button5Down);//use object
985 Cmd_AddCommand ("-use", IN_Button5Up);
986 Cmd_AddCommand ("+force_grip", IN_Button6Down);//force jump
987 Cmd_AddCommand ("-force_grip", IN_Button6Up);
988 Cmd_AddCommand ("+altattack", IN_Button7Down);//altattack
989 Cmd_AddCommand ("-altattack", IN_Button7Up);
990#ifndef JK2_MODE
991 Cmd_AddCommand ("+forcefocus", IN_Button8Down);//special saber attacks
992 Cmd_AddCommand ("-forcefocus", IN_Button8Up);
993 Cmd_AddCommand ("+block", IN_Button8Down);//manual blocking
994 Cmd_AddCommand ("-block", IN_Button8Up);
995#endif
996
997 Cmd_AddCommand ("+button0", IN_Button0Down);

Callers 1

CL_InitFunction · 0.70

Calls 2

Cmd_AddCommandFunction · 0.50
Cvar_GetFunction · 0.50

Tested by

no test coverage detected