public void init_Default_Bind() { coActionMap moveMap = "moveMap"; moveMap.bind("keyboard", "F2", "showPlayerList"); moveMap.bind("keyboard", "h", "showControlsHelp"); moveMap.bind("keyboard", "ctrl h", "hideHUDs"); moveMap.bind("keyboard", "alt p", "doScreenShotHudless"); moveMap.bind("keyboard", "a", "moveleft"); moveMap.bind("keyboard", "d", "moveright"); moveMap.bind("keyboard", "left", "moveleft"); moveMap.bind("keyboard", "right", "moveright"); moveMap.bind("keyboard", "w", "moveforward"); moveMap.bind("keyboard", "s", "movebackward"); moveMap.bind("keyboard", "up", "moveforward"); moveMap.bind("keyboard", "down", "movebackward"); moveMap.bind("keyboard", "e", "moveup"); moveMap.bind("keyboard", "c", "movedown"); moveMap.bind("keyboard", "space", "jump"); moveMap.bind("mouse", "xaxis", "yaw"); moveMap.bind("mouse", "yaxis", "pitch"); moveMap.bind("mouse", "button0", "mouseFire"); moveMap.bind("mouse", "button1", "mouseButtonZoom"); moveMap.bind("mouse", "zaxis", "mouseWheelWeaponCycle"); moveMap.bind("gamepad", "thumbrx", "D", "-0.23 0.23", "gamepadYaw"); moveMap.bind("gamepad", "thumbry", "D", "-0.23 0.23", "gamepadPitch"); moveMap.bind("gamepad", "thumblx", "D", "-0.23 0.23", "gamePadMoveX"); moveMap.bind("gamepad", "thumbly", "D", "-0.23 0.23", "gamePadMoveY"); moveMap.bind("gamepad", "btn_a", "jump"); moveMap.bind("keyboard", "lcontrol", "doCrouch"); moveMap.bind("gamepad", "btn_b", "doCrouch"); moveMap.bind("keyboard", "lshift", "doSprint"); moveMap.bind("gamepad", "triggerr", "gamepadFire"); moveMap.bind("gamepad", "triggerl", "gamepadAltTrigger"); moveMap.bind("keyboard", "f", "setZoomFOV"); moveMap.bind("keyboard", "z", "toggleZoom"); moveMap.bind("keyboard", "v", "toggleFreeLook"); moveMap.bind("keyboard", "tab", "toggleFirstPerson"); moveMap.bind("keyboard", "alt c", "toggleCamera"); moveMap.bind("gamepad", "btn_start", "toggleCamera"); moveMap.bind("gamepad", "btn_x", "toggleFirstPerson"); moveMap.bind("keyboard", "0", "unmountWeapon"); moveMap.bind("keyboard", "alt w", "throwWeapon"); moveMap.bind("keyboard", "alt a", "tossAmmo"); moveMap.bind("keyboard", "q", "nextWeapon"); moveMap.bind("keyboard", "ctrl q", "prevWeapon"); moveMap.bind("keyboard", "u", "toggleMessageHud"); moveMap.bind("keyboard", "pageUp", "pageMessageHudUp"); moveMap.bind("keyboard", "pageDown", "pageMessageHudDown"); moveMap.bind("keyboard", "p", "resizeMessageHud"); moveMap.bind("keyboard", "F3", "startRecordingDemo"); moveMap.bind("keyboard", "F4", "stopRecordingDemo"); moveMap.bind("keyboard", "F8", "dropCameraAtPlayer"); moveMap.bind("keyboard", "F7", "dropPlayerAtCamera"); moveMap.bindCmd("keyboard", "escape", "", "handleEscape();"); moveMap.bindCmd("gamepad", "btn_back", "disconnect();", ""); moveMap.bindCmd("gamepad", "dpadl", "toggleLightColorViz();", ""); moveMap.bindCmd("gamepad", "dpadu", "toggleDepthViz();", ""); moveMap.bindCmd("gamepad", "dpadd", "toggleNormalsViz();", ""); moveMap.bindCmd("gamepad", "dpadr", "toggleLightSpecularViz();", ""); moveMap.bindCmd("keyboard", "ctrl k", "commandToServer('suicide');", ""); moveMap.bindCmd("keyboard", "1", "commandToServer('use',\"Ryder\");", ""); moveMap.bindCmd("keyboard", "2", "commandToServer('use',\"Lurker\");", ""); moveMap.bindCmd("keyboard", "3", "commandToServer('use',\"LurkerGrenadeLauncher\");", ""); moveMap.bindCmd("keyboard", "4", "commandToServer('use',\"ProxMine\");", ""); moveMap.bindCmd("keyboard", "5", "commandToServer('use',\"DeployableTurret\");", ""); moveMap.bindCmd("keyboard", "r", "commandToServer('reloadWeapon');", ""); moveMap.bindCmd("keyboard", "n", "toggleNetGraph();", ""); moveMap.bindCmd("keyboard", "ctrl z", "carjack();", ""); coActionMap GlobalActionMap = "GlobalActionMap"; GlobalActionMap.bind("keyboard", "ctrl o", "bringUpOptions"); GlobalActionMap.bind("keyboard", "F9", "cycleDebugRenderMode"); GlobalActionMap.bind("keyboard", "ctrl F3", "doProfile"); GlobalActionMap.bind("keyboard", "tilde", "toggleConsole"); GlobalActionMap.bindCmd("keyboard", "alt k", "cls();", ""); GlobalActionMap.bindCmd("keyboard", "alt enter", "", "Canvas.attemptFullscreenToggle();"); GlobalActionMap.bindCmd("keyboard", "F1", "", "contextHelp();"); coActionMap vehicleMap = "vehicleMap"; vehicleMap.bindCmd("keyboard", "ctrl x", "commandToServer(\'flipCar\');", ""); vehicleMap.bindCmd("keyboard", "ctrl f", "getout();", ""); vehicleMap.bindCmd("keyboard", "l", "brakeLights();", ""); vehicleMap.bindCmd("keyboard", "escape", "", "handleEscape();"); vehicleMap.bind("keyboard", "w", "moveforward"); vehicleMap.bind("keyboard", "s", "movebackward"); vehicleMap.bind("keyboard", "up", "moveforward"); vehicleMap.bind("keyboard", "down", "movebackward"); vehicleMap.bind("mouse", "xaxis", "yaw"); vehicleMap.bind("mouse", "yaxis", "pitch"); vehicleMap.bind("mouse", "button0", "mouseFire"); vehicleMap.bind("mouse", "button1", "altTrigger"); vehicleMap.bind("keyboard", "space", "brake"); vehicleMap.bind("keyboard", "h", "showControlsHelp"); vehicleMap.bind("keyboard", "v", "toggleFreeLook"); vehicleMap.bind("keyboard", "alt c", "toggleCamera"); }
public void initializeCore() { // Not Reentrant if (bGlobal["$coreInitialized"]) { return; } // Core keybindings. coActionMap GlobalActionMap = "GlobalActionMap"; GlobalActionMap.bind("keyboard", "tilde", "toggleConsole"); GlobalActionMap.bind("keyboard", "ctrl p", "doScreenShot"); GlobalActionMap.bindCmd("keyboard", "alt enter", "Canvas.attemptFullscreenToggle();", ""); GlobalActionMap.bindCmd("keyboard", "alt k", "cls();", ""); /* * core 20000 * audio 21000 * canvas 22000 * cursor 23000 * profiles 24000 * GuiCursors 25000 * audioEnviroments 26000 * audioDescriptions 27000 * audioStates 28000 * audioAmbiences 29000 */ dnt.DoScriptInjection(ScriptType.Client, 20000, 29999); // Seed the random number generator. Util.setRandomSeed(DateTime.Now.Millisecond); // Set up networking. Util._setNetPort("0", true.AsString()); // Initialize the canvas. initializeCanvas(); // Start processing file change events. Util.startFileChangeNotifications(); Util.exec("core/art/gui/remapDlg.gui", false, false); Util.exec("core/art/gui/console.gui", false, false); Util.exec("core/art/gui/consoleVarDlg.gui", false, false); Util.exec("core/art/gui/netGraphGui.gui", false, false); /* help 30000 * screenshot 31000 * scriptDoc 32000 * helperfuncs 33000 * commands 34000 * devHelpers 35000 * metrics 36000 * recordings 37000 * centerPrint 38000 */ dnt.DoScriptInjection(ScriptType.Client, 30000, 38999); loadCoreMaterials(); /* * commonMaterialData 40000 * shaders 41000 * materials 42000 * terrainBlock 43000 * water 44000 * imposter 45000 * scatterSky 46000 * clouds 47000 * postfx 48000 */ dnt.DoScriptInjection(ScriptType.Client, 40000, 48999); initPostEffects(); // Initialize the post effect manager. /* postFX/postFXManager_Gui_cs 102000 * postFX/postFXManager_gui_cs_cs 103000 * postfx/postfxmanagerguid_settings 104000 * postFX/postFXManager.persistance 105000 */ dnt.DoScriptInjection(ScriptType.Client, 102000, 105999); PostFXManagersettingsApplyDefaultPreset("PostFXManager"); ((coGuiCanvas)"Canvas").setCursor("DefaultCursor"); console.Call("loadKeybindings"); bGlobal["$coreInitialized"] = true; }