summaryrefslogtreecommitdiff
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-02 15:28:19 +0300
committerSergeanur <s.anureev@yandex.ua>2020-05-02 15:28:19 +0300
commit52390062b39a3398379934e59a15faa01613e586 (patch)
treeba7c8c16921d09a9ec1e2d33323ab142048a3290 /src/control/Pickups.cpp
parentd23b2c423e5811cf6e9de28cbf8490de32ea4fb5 (diff)
SetPosition, part 2
Diffstat (limited to 'src/control/Pickups.cpp')
-rw-r--r--src/control/Pickups.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index 08ce9418..bc1bbf1c 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -288,7 +288,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
case PICKUP_NAUTICAL_MINE_INACTIVE:
{
if (CWaterLevel::GetWaterLevel(m_pObject->GetPosition().x, m_pObject->GetPosition().y, m_pObject->GetPosition().z + 5.0f, &waterLevel, false))
- m_pObject->GetPosition().z = waterLevel + 0.6f;
+ m_pObject->GetMatrix().GetPosition().z = waterLevel + 0.6f;
m_pObject->GetMatrix().UpdateRW();
m_pObject->UpdateRwFrame();
@@ -310,7 +310,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
}
case PICKUP_NAUTICAL_MINE_ARMED:
if (CWaterLevel::GetWaterLevel(m_pObject->GetPosition().x, m_pObject->GetPosition().y, m_pObject->GetPosition().z + 5.0f, &waterLevel, false))
- m_pObject->GetPosition().z = waterLevel + 0.6f;
+ m_pObject->GetMatrix().GetPosition().z = waterLevel + 0.6f;
m_pObject->GetMatrix().UpdateRW();
m_pObject->UpdateRwFrame();
@@ -337,7 +337,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
}
case PICKUP_FLOATINGPACKAGE:
m_pObject->m_vecMoveSpeed.z -= 0.01f * CTimer::GetTimeStep();
- m_pObject->GetPosition() += m_pObject->GetMoveSpeed() * CTimer::GetTimeStep();
+ m_pObject->GetMatrix().GetPosition() += m_pObject->GetMoveSpeed() * CTimer::GetTimeStep();
m_pObject->GetMatrix().UpdateRW();
m_pObject->UpdateRwFrame();
@@ -346,7 +346,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
break;
case PICKUP_FLOATINGPACKAGE_FLOATING:
if (CWaterLevel::GetWaterLevel(m_pObject->GetPosition().x, m_pObject->GetPosition().y, m_pObject->GetPosition().z + 5.0f, &waterLevel, 0))
- m_pObject->GetPosition().z = waterLevel;
+ m_pObject->GetMatrix().GetPosition().z = waterLevel;
m_pObject->GetMatrix().UpdateRW();
m_pObject->UpdateRwFrame();