From 5e9fa3769e9ac8940692d1d7da8d3fbffbb7cb14 Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Tue, 10 Sep 2024 07:37:50 +1000 Subject: [PATCH] Blood: Expose turn speed option for keyboard control menu --- source/blood/src/menu.cpp | 11 +++++++---- source/blood/src/osdcmd.cpp | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/blood/src/menu.cpp b/source/blood/src/menu.cpp index dca93155ad..9d09175c15 100644 --- a/source/blood/src/menu.cpp +++ b/source/blood/src/menu.cpp @@ -723,9 +723,10 @@ CGameMenuItemChain itemOptionsControlJoystickButtons("JOYSTICK BUTTONS SETUP", 1 CGameMenuItemChain itemOptionsControlJoystickAxes("JOYSTICK AXES SETUP", 1, 0, 140, 320, 1, &menuOptionsControlJoystickListAxes, -1, SetupJoystickAxesMenu, 0); CGameMenuItemTitle itemOptionsControlKeyboardTitle("KEYBOARD SETUP", 1, 160, 20, 2038); -CGameMenuItemChain itemOptionsControlKeyboardList("Configure Keys...", 1, 0, 60, 320, 1, &menuKeys, -1, NULL, 0); -CGameMenuItemChain itemOptionsControlKeyboardReset("Reset Keys (default)...", 1, 0, 80, 320, 1, &menuKeys, -1, ResetKeys, 0); -CGameMenuItemChain itemOptionsControlKeyboardResetClassic("Reset Keys (classic)...", 1, 0, 100, 320, 1, &menuKeys, -1, ResetKeysClassic, 0); +CGameMenuItemSlider itemOptionsControlKeyboardSliderTurnSpeed("Key Turn Speed:", 1, 18, 50, 280, &gTurnSpeed, 64, 128, 4, SetTurnSpeed, -1, -1); +CGameMenuItemChain itemOptionsControlKeyboardList("Configure Keys...", 1, 0, 110, 320, 1, &menuKeys, -1, NULL, 0); +CGameMenuItemChain itemOptionsControlKeyboardReset("Reset Keys (default)...", 1, 0, 135, 320, 1, &menuKeys, -1, ResetKeys, 0); +CGameMenuItemChain itemOptionsControlKeyboardResetClassic("Reset Keys (classic)...", 1, 0, 155, 320, 1, &menuKeys, -1, ResetKeysClassic, 0); void SetMouseAimMode(CGameMenuItemZBool *pItem); void SetMouseVerticalAim(CGameMenuItemZBool *pItem); @@ -1434,11 +1435,13 @@ void SetupControlsMenu(void) menuOptionsControl.Add(&itemBloodQAV, false); menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardTitle, false); - menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardList, true); + menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardSliderTurnSpeed, true); + menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardList, false); menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardReset, false); menuOptionsControlKeyboard.Add(&itemOptionsControlKeyboardResetClassic, false); menuOptionsControlKeyboard.Add(&itemBloodQAV, false); + itemOptionsControlKeyboardSliderTurnSpeed.nValue = gTurnSpeed; menuOptionsControlMouse.Add(&itemOptionsControlMouseTitle, false); menuOptionsControlMouse.Add(&itemOptionsControlMouseButton, true); menuOptionsControlMouse.Add(&itemOptionsControlMouseSensitivity, false); diff --git a/source/blood/src/osdcmd.cpp b/source/blood/src/osdcmd.cpp index ab81c3a157..f8ddd3d075 100644 --- a/source/blood/src/osdcmd.cpp +++ b/source/blood/src/osdcmd.cpp @@ -1030,6 +1030,7 @@ int32_t registerosdcommands(void) { "in_mousedeadzone", "amount of mouse movement to filter out", (void *)&MouseDeadZone, CVAR_INT, 0, 512 }, { "in_mouseflip", "invert vertical mouse movement", (void *)&gMouseAimingFlipped, CVAR_BOOL, 0, 1 }, { "in_mousemode", "toggles vertical mouse view", (void *)&gMouseAim, CVAR_BOOL, 0, 1 }, + { "in_turnsensitivity", "keyboard turning sensitivity multiplier", (void *)&gTurnSpeed, CVAR_INT, 64, 124 }, // { "mus_enabled", "enables/disables music", (void *)&MusicToggle, CVAR_BOOL, 0, 1 }, { "mus_restartonload", "restart the music when loading a saved game with the same map or not", (void *)&MusicRestartsOnLoadToggle, CVAR_BOOL, 0, 1 },