From 95a601f03026b3d63d14c6d4ee11df690e8901b2 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Wed, 14 Apr 2021 14:57:08 +0200 Subject: [PATCH] keeper: small value tweaking --- include/strategy_roles/keeper.h | 2 +- src/strategy_roles/keeper.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/strategy_roles/keeper.h b/include/strategy_roles/keeper.h index 33d866c..a4113eb 100644 --- a/include/strategy_roles/keeper.h +++ b/include/strategy_roles/keeper.h @@ -13,7 +13,7 @@ #define KEEPER_POINT_CENTER_C CAMERA_GOAL_X #define KEEPER_POINT_RIGHT_C CAMERA_GOAL_MAX_X #endif -#define KEEPER_ATTACK_DISTANCE 120 +#define KEEPER_ATTACK_DISTANCE 100 class Keeper : public Game{ diff --git a/src/strategy_roles/keeper.cpp b/src/strategy_roles/keeper.cpp index 1f351ad..848c86b 100644 --- a/src/strategy_roles/keeper.cpp +++ b/src/strategy_roles/keeper.cpp @@ -40,9 +40,9 @@ void Keeper::keeper() return; } - if(CURRENT_DATA_READ.ballAngle >= 330 || CURRENT_DATA_READ.ballAngle <= 30) currentPosition = currentPosition; //Unneeded, just here for clarity - else if(CURRENT_DATA_READ.ballAngle > 30 && CURRENT_DATA_READ.ballAngle < 90) currentPosition ++; - else if(CURRENT_DATA_READ.ballAngle > 270 && CURRENT_DATA_READ.ballAngle < 330) currentPosition --; + if(CURRENT_DATA_READ.ballAngle >= 340 || CURRENT_DATA_READ.ballAngle <= 20) currentPosition = currentPosition; //Unneeded, just here for clarity + else if(CURRENT_DATA_READ.ballAngle > 20 && CURRENT_DATA_READ.ballAngle < 90) currentPosition ++; + else if(CURRENT_DATA_READ.ballAngle > 270 && CURRENT_DATA_READ.ballAngle < 340) currentPosition --; else{ shouldStrike = true; }