From 9fc0ec0bf4ed7d83195255d241652feb76d49a9b Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 28 Jan 2021 02:41:21 +0300 Subject: I hate ATanOfXY pt 2 --- src/control/Script9.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/control/Script9.cpp') diff --git a/src/control/Script9.cpp b/src/control/Script9.cpp index 020221c4..3a68e239 100644 --- a/src/control/Script9.cpp +++ b/src/control/Script9.cpp @@ -431,8 +431,8 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command) CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); SET_FLOAT_PARAM(1, LimitAngleOnCircle(RADTODEG(Asin(pVehicle->GetForward().z)))); - SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(CGeneral::GetATanOfXY(pVehicle->GetForward().x, pVehicle->GetForward().y)))); - SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(CGeneral::GetATanOfXY(pVehicle->GetUp().z, pVehicle->GetRight().z)))); + SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(Atan2(-pVehicle->GetForward().x, pVehicle->GetForward().y)))); + SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(Atan2(-pVehicle->GetRight().z, pVehicle->GetUp().z)))); StoreParameters(&m_nIp, 3); return 0; } -- cgit v1.2.3