From 9c6046455ead2d8777f79e585254151b28551864 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 23 May 2020 12:17:05 +0300 Subject: fixed script --- src/control/Script.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 52247f05..85098cca 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -8902,7 +8902,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) CollectParameters(&m_nIp, 4); CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); assert(pObject); - CVector result = pObject->GetPosition() + pObject->GetMatrix() * *(CVector*)&ScriptParams[1]; + CVector result = Multiply3x3(pObject->GetMatrix(), *(CVector*)&ScriptParams[1]) + pObject->GetPosition(); *(CVector*)&ScriptParams[0] = result; StoreParameters(&m_nIp, 3); return 0; @@ -8935,7 +8935,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) CollectParameters(&m_nIp, 4); CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]); assert(pVehicle); - CVector result = pVehicle->GetMatrix() * *(CVector*)&ScriptParams[1] + pVehicle->GetPosition(); + CVector result = Multiply3x3(pVehicle->GetMatrix(), *(CVector*)&ScriptParams[1]) + pVehicle->GetPosition(); *(CVector*)&ScriptParams[0] = result; StoreParameters(&m_nIp, 3); return 0; @@ -10554,8 +10554,8 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command) CollectParameters(&m_nIp, 4); CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); assert(pPed); - CVector offset = pPed->GetMatrix() * *(CVector*)&ScriptParams[1]; - *(CVector*)&ScriptParams[0] = pPed->GetPosition() + offset; + CVector result = Multiply3x3(pPed->GetMatrix(), *(CVector*)&ScriptParams[1]) + pPed->GetPosition(); + *(CVector*)&ScriptParams[0] = result; StoreParameters(&m_nIp, 3); return 0; } -- cgit v1.2.3