From 99af19e31a978c3836791d917c14f97a3d37bb27 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Wed, 15 May 2024 17:07:38 +0200 Subject: [PATCH] factor --- GameControllerHandler.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/GameControllerHandler.h b/GameControllerHandler.h index de192a1..c34b8c7 100644 --- a/GameControllerHandler.h +++ b/GameControllerHandler.h @@ -42,15 +42,12 @@ public: if (tokens[2] == "stop proximity") { std::vector args = Utils::split(tokens[3], ","); int distance = stoi(args[0]); - double angle = (stod(args[1]) / 100) + (PI / 2); - Uint16 strength = 0xFFFF; + Uint16 strength = 0; if (distance <= 200) { strength = 0xFFFF; } else if (distance <= 500) { double factor = 1.0 - static_cast(distance - 200) / (500 - 200); - double angleFactor = std::abs(std::sin(angle)); - strength = static_cast(factor * 0xFFFF); } else { strength = 0;