summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-28 00:41:21 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-28 00:41:21 +0100
commit9fc0ec0bf4ed7d83195255d241652feb76d49a9b (patch)
treef389b43844b6fe2f94d07a0911a30fc8dfaff3ff
parentfix (diff)
downloadre3-9fc0ec0bf4ed7d83195255d241652feb76d49a9b.tar
re3-9fc0ec0bf4ed7d83195255d241652feb76d49a9b.tar.gz
re3-9fc0ec0bf4ed7d83195255d241652feb76d49a9b.tar.bz2
re3-9fc0ec0bf4ed7d83195255d241652feb76d49a9b.tar.lz
re3-9fc0ec0bf4ed7d83195255d241652feb76d49a9b.tar.xz
re3-9fc0ec0bf4ed7d83195255d241652feb76d49a9b.tar.zst
re3-9fc0ec0bf4ed7d83195255d241652feb76d49a9b.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script10.cpp4
-rw-r--r--src/control/Script9.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/control/Script10.cpp b/src/control/Script10.cpp
index fef33848..6514ebe5 100644
--- a/src/control/Script10.cpp
+++ b/src/control/Script10.cpp
@@ -223,8 +223,8 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command)
CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0));
script_assert(pObject);
SET_FLOAT_PARAM(1, LimitAngleOnCircle(RADTODEG(Asin(pObject->GetForward().z))));
- SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(CGeneral::GetATanOfXY(pObject->GetForward().x, pObject->GetForward().y))));
- SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(CGeneral::GetATanOfXY(pObject->GetUp().z, pObject->GetRight().z))));
+ SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(Atan2(-pObject->GetForward().x, pObject->GetForward().y))));
+ SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(Atan2(-pObject->GetRight().z, pObject->GetUp().z))));
StoreParameters(&m_nIp, 3);
return 0;
}
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;
}