From 47d52fe9193728d4fe692cf10a7b2107c09e7b1e Mon Sep 17 00:00:00 2001 From: dewfewg <3061784569@qq.com> Date: Mon, 30 Oct 2023 22:58:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=AA=E9=9A=BE=E4=BA=86=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E7=8E=A9=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StrategySystem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/StrategySystem.cpp b/StrategySystem.cpp index 843fe4b..c358f4a 100644 --- a/StrategySystem.cpp +++ b/StrategySystem.cpp @@ -94,18 +94,18 @@ void CStrategySystem::Shot(int which) { if(t1.y<409) { t4.x=65;t4.y=505; - O = Angle(t4,ball.position); + O = Angle(ball.position,t4); t3.x=t1.x+cos(180-O)*19.0; t3.y=t1.y-sin(180-O)*19.0; } if(t1.y>=409) { t4.x=65;t4.y=313; - O = Angle(t4,ball.position); - t3.x=t1.x+cos(180-O)*19.0; - t3.y=t1.y+sin(180-O)*19.0; + O = Angle(ball.position,t4); + t3.x=t1.x+cos(O-180)*19.0; + t3.y=t1.y+sin(O-180)*19.0; } - O=Angle(t4,ball.position); + O=Angle(robot->position,ball.position); if (abs((Angle(t4,ball.position))-Angle(ball.position,robot->position)<=5)&&Distance(ball.position,robot->position)<=20) shot1(which,O); else