From 8b80a8803b005565ddad1bac2cb6e35f398dc5ca Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Mon, 18 Jan 2021 23:59:07 +0300 Subject: fix --- 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 3c4860f7..51dc14d3 100644 --- a/src/control/Script4.cpp +++ b/src/control/Script4.cpp @@ -1495,7 +1495,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); script_assert(pVehicle); const CVector& pos = pVehicle->GetPosition(); - float heading = CGeneral::GetATanOfXY(pos.y - *(float*)&ScriptParams[2], pos.x - *(float*)&ScriptParams[1]) + HALFPI; + float heading = CGeneral::GetATanOfXY(pos.x - *(float*)&ScriptParams[1], pos.y - *(float*)&ScriptParams[2]) + HALFPI; if (heading > TWOPI) heading -= TWOPI; pVehicle->SetHeading(heading); -- cgit v1.2.3