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)