Esempio n. 1
0
        public void initDefaultBind()
        {
            coActionMap moveMap = "moveMap";

            if (moveMap.isObject())
            {
                moveMap.delete();
            }

            new Torque_Class_Helper("ActionMap", "moveMap").Create();

            if (console.GetVarString("$Player::CurrentFOV") == "")
            {
                console.SetVar("$Player::CurrentFOV", console.GetVarFloat("$pref::Player::DefaultFOV") / (float)2.0);
            }

            console.SetVar("$MFDebugRenderMode", 0);

            coActionMap vehicleMap = "vehicleMap";

            if (vehicleMap.isObject())
            {
                vehicleMap.delete();
            }

            new Torque_Class_Helper("ActionMap", "vehicleMap").Create();
        }
Esempio n. 2
0
        public void dumpKeybindings()
        {
            for (int i = 0; i < console.GetVarInt("$keybindCount"); i++)
            {
                coActionMap bindobj = console.GetVarString("$keybindMap[%i]");
                if (!bindobj.isObject())
                {
                    continue;
                }
                string prefspath = console.Call("getPrefsPath", new[] { "bind.cs" });

                bindobj.save(prefspath, i != 0);
                bindobj.delete();
            }
        }