From 7e9f277ae909d42443d4b2df8e8d1b36570c509b Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 1 Sep 2021 18:36:03 +0200 Subject: [PATCH] Remove aim assist premake configuration value again in favor of being able to disable aim assist using the server dvar --- premake5.lua | 8 -------- src/Components/Modules/Gamepad.cpp | 10 +--------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/premake5.lua b/premake5.lua index 20744831..91bee2df 100644 --- a/premake5.lua +++ b/premake5.lua @@ -79,11 +79,6 @@ newoption { description = "Zonebuilder generates iw4x zones that cannot be loaded without IW4x specific patches." } -newoption { - trigger = "aimassist-enable", - description = "Enables code for controller aim assist." -} - newaction { trigger = "version", description = "Returns the version string for the current commit of the source code.", @@ -337,9 +332,6 @@ workspace "iw4x" if _OPTIONS["iw4x-zones"] then defines { "GENERATE_IW4X_SPECIFIC_ZONES" } end - if _OPTIONS["aimassist-enable"] then - defines { "AIM_ASSIST_ENABLED" } - end -- Pre-compiled header pchheader "STDInclude.hpp" -- must be exactly same as used in #include directives diff --git a/src/Components/Modules/Gamepad.cpp b/src/Components/Modules/Gamepad.cpp index d5e91e97..990a18fc 100644 --- a/src/Components/Modules/Gamepad.cpp +++ b/src/Components/Modules/Gamepad.cpp @@ -437,8 +437,6 @@ namespace Components void Gamepad::AimAssist_ApplyLockOn(const Game::AimInput* input, Game::AimOutput* output) { -#ifdef AIM_ASSIST_ENABLED - assert(input); assert(input->localClientNum < Game::MAX_GAMEPADS); auto& aaGlob = Game::aaGlobArray[input->localClientNum]; @@ -481,8 +479,6 @@ namespace Components output->pitch -= pitchTurnRate * input->deltaTime; output->yaw += yawTurnRate * input->deltaTime; } - -#endif } void Gamepad::AimAssist_CalcAdjustedAxis(const Game::AimInput* input, float* pitchAxis, float* yawAxis) @@ -564,9 +560,7 @@ namespace Components *pitchScale = 1.0f; *yawScale = 1.0f; - -#ifdef AIM_ASSIST_ENABLED - + if (!AimAssist_IsSlowdownActive(&aaGlob.ps)) return; @@ -582,8 +576,6 @@ namespace Components if (AimAssist_IsPlayerUsingOffhand(&aaGlob.ps)) *pitchScale = 1.0f; - -#endif } float Gamepad::AimAssist_Lerp(const float from, const float to, const float fraction)