summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-23 11:17:05 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-23 11:17:05 +0200
commit9c6046455ead2d8777f79e585254151b28551864 (patch)
treeecc6612cbb83ed2b2e32b4e04f38525e3b114708 /src
parentMerge pull request #580 from Nick007J/miami (diff)
downloadre3-9c6046455ead2d8777f79e585254151b28551864.tar
re3-9c6046455ead2d8777f79e585254151b28551864.tar.gz
re3-9c6046455ead2d8777f79e585254151b28551864.tar.bz2
re3-9c6046455ead2d8777f79e585254151b28551864.tar.lz
re3-9c6046455ead2d8777f79e585254151b28551864.tar.xz
re3-9c6046455ead2d8777f79e585254151b28551864.tar.zst
re3-9c6046455ead2d8777f79e585254151b28551864.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script.cpp8
1 files 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;
}