From a105003a7a7136dc37b3acd808f168a980716efe Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 23 Jan 2021 12:54:08 +0300 Subject: I hate GetATanOfXY --- src/control/Script4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/control/Script4.cpp') diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp index 20e041da..c3eb2e89 100644 --- a/src/control/Script4.cpp +++ b/src/control/Script4.cpp @@ -477,7 +477,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) float fx = pObject->GetForward().x; float fy = pObject->GetForward().y; float heading = LimitAngleOnCircle( - RADTODEG(CGeneral::GetATanOfXY(pObject->GetForward().x, pObject->GetForward().y))); + RADTODEG(Atan2(-pObject->GetForward().x, pObject->GetForward().y))); float headingTarget = GET_FLOAT_PARAM(1); #ifdef FIX_BUGS float rotateBy = GET_FLOAT_PARAM(2) * CTimer::GetTimeStepFix(); -- cgit v1.2.3