From 925eb1d0a9709e5b3c02621164412083cf2da5c1 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 30 Aug 2021 19:29:41 +0200 Subject: [PATCH] Remove unused outdated xpad dvars for gamepad --- src/Components/Modules/Gamepad.cpp | 12 ++---------- src/Components/Modules/Gamepad.hpp | 9 +-------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/Components/Modules/Gamepad.cpp b/src/Components/Modules/Gamepad.cpp index 6e032929..a51839f2 100644 --- a/src/Components/Modules/Gamepad.cpp +++ b/src/Components/Modules/Gamepad.cpp @@ -193,13 +193,6 @@ namespace Components Dvar::Var Gamepad::aim_lockon_pitch_strength; Dvar::Var Gamepad::aim_lockon_strength; - Dvar::Var Gamepad::xpadSensitivity; - Dvar::Var Gamepad::xpadEarlyTime; - Dvar::Var Gamepad::xpadEarlyMultiplier; - Dvar::Var Gamepad::xpadHorizontalMultiplier; - Dvar::Var Gamepad::xpadVerticalMultiplier; - Dvar::Var Gamepad::xpadAdsMultiplier; - struct ControllerMenuKeyMapping { Game::keyNum_t controllerKey; @@ -803,7 +796,7 @@ namespace Components return static_cast(std::clamp(value, std::numeric_limits::min(), std::numeric_limits::max())); } - void Gamepad::CL_GamepadMove(const int gamePadIndex, Game::usercmd_s* cmd, const float frame_time_base) + void Gamepad::CL_GamepadMove(const int gamePadIndex, Game::usercmd_s* cmd, const float frameTimeBase) { assert(gamePadIndex < Game::MAX_GAMEPADS); auto& gamePad = gamePads[gamePadIndex]; @@ -841,7 +834,7 @@ namespace Components { Game::AimInput aimInput{}; Game::AimOutput aimOutput{}; - aimInput.deltaTime = frame_time_base; + aimInput.deltaTime = frameTimeBase; aimInput.buttons = cmd->buttons; aimInput.localClientNum = gamePadIndex; aimInput.deltaTimeScaled = static_cast(Game::cls->frametime) * 0.001f; @@ -862,7 +855,6 @@ namespace Components } constexpr auto CL_MouseMove = 0x5A6240; - __declspec(naked) void Gamepad::CL_MouseMove_Stub() { __asm diff --git a/src/Components/Modules/Gamepad.hpp b/src/Components/Modules/Gamepad.hpp index dbcdeb08..75c7a099 100644 --- a/src/Components/Modules/Gamepad.hpp +++ b/src/Components/Modules/Gamepad.hpp @@ -323,13 +323,6 @@ namespace Components static Dvar::Var aim_lockon_pitch_strength; static Dvar::Var aim_lockon_strength; - static Dvar::Var xpadSensitivity; - static Dvar::Var xpadEarlyTime; - static Dvar::Var xpadEarlyMultiplier; - static Dvar::Var xpadHorizontalMultiplier; - static Dvar::Var xpadVerticalMultiplier; - static Dvar::Var xpadAdsMultiplier; - static void MSG_WriteDeltaUsercmdKeyStub(); static void ApplyMovement(Game::msg_t* msg, int key, Game::usercmd_s* from, Game::usercmd_s* to); @@ -358,7 +351,7 @@ namespace Components static bool CG_ShouldUpdateViewAngles(int localClientNum); static float CL_GamepadAxisValue(int gamePadIndex, Game::GamepadVirtualAxis virtualAxis); static char ClampChar(int value); - static void CL_GamepadMove(int gamePadIndex, Game::usercmd_s* cmd, float frame_time_base); + static void CL_GamepadMove(int gamePadIndex, Game::usercmd_s* cmd, float frameTimeBase); static void CL_MouseMove_Stub(); static bool Key_IsValidGamePadChar(int key);