diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-02 17:02:45 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-02 17:02:45 +0200 |
commit | 7d067684ff4c69ecaf911ca23b478087f5655437 (patch) | |
tree | a47fbbaf7937616d80e799f3a9157d933c1f69c0 /src/vehicles | |
parent | changed saving compatibility (diff) | |
parent | A bit more audio cleanup (diff) | |
download | re3-7d067684ff4c69ecaf911ca23b478087f5655437.tar re3-7d067684ff4c69ecaf911ca23b478087f5655437.tar.gz re3-7d067684ff4c69ecaf911ca23b478087f5655437.tar.bz2 re3-7d067684ff4c69ecaf911ca23b478087f5655437.tar.lz re3-7d067684ff4c69ecaf911ca23b478087f5655437.tar.xz re3-7d067684ff4c69ecaf911ca23b478087f5655437.tar.zst re3-7d067684ff4c69ecaf911ca23b478087f5655437.zip |
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/Automobile.cpp | 2 | ||||
-rw-r--r-- | src/vehicles/Boat.cpp | 6 | ||||
-rw-r--r-- | src/vehicles/CarGen.cpp | 4 | ||||
-rw-r--r-- | src/vehicles/Cranes.cpp | 4 | ||||
-rw-r--r-- | src/vehicles/Heli.cpp | 14 | ||||
-rw-r--r-- | src/vehicles/Train.cpp | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 9d602254..acca4d60 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -1220,7 +1220,7 @@ CAutomobile::Teleport(CVector pos) { CWorld::Remove(this); - GetPosition() = pos; + SetPosition(pos); SetOrientation(0.0f, 0.0f, 0.0f); SetMoveSpeed(0.0f, 0.0f, 0.0f); SetTurnSpeed(0.0f, 0.0f, 0.0f); diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 8c8cce1c..1f80c43e 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -520,7 +520,7 @@ CBoat::ProcessControl(void) // is this some inlined CPlaceable method? CVector pos = GetPosition(); GetMatrix().RotateZ(m_fOrientation - GetForward().Heading()); - GetPosition() = pos; + GetMatrix().GetPosition() = pos; } } @@ -680,7 +680,7 @@ CBoat::BlowUpCar(CEntity *culprit) dist.Normalise(); if(GetUp().z > 0.0f) dist += GetUp(); - obj->GetPosition() += GetUp(); + obj->GetMatrix().GetPosition() += GetUp(); CWorld::Add(obj); @@ -771,7 +771,7 @@ void CBoat::Teleport(CVector v) { CWorld::Remove(this); - GetPosition() = v; + SetPosition(v); SetOrientation(0.0f, 0.0f, 0.0f); SetMoveSpeed(0.0f, 0.0f, 0.0f); SetTurnSpeed(0.0f, 0.0f, 0.0f); diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index c04e8c35..72b6c30c 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -59,7 +59,7 @@ void CCarGenerator::DoInternalProcessing() if (pos.z <= -100.0f) pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y); pos.z += pBoat->GetDistanceFromCentreOfMassToBaseOfModel(); - pBoat->GetPosition() = pos; + pBoat->SetPosition(pos); pBoat->SetOrientation(0.0f, 0.0f, DEGTORAD(m_fAngle)); pBoat->SetStatus(STATUS_ABANDONED); pBoat->m_nDoorLock = CARLOCK_UNLOCKED; @@ -93,7 +93,7 @@ void CCarGenerator::DoInternalProcessing() pCar->bIsStatic = false; pCar->bEngineOn = false; pos.z += pCar->GetDistanceFromCentreOfMassToBaseOfModel(); - pCar->GetPosition() = pos; + pCar->SetPosition(pos); pCar->SetOrientation(0.0f, 0.0f, DEGTORAD(m_fAngle)); pCar->SetStatus(STATUS_ABANDONED); pCar->bLightsOn = false; diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp index 725c9e87..1cace3e1 100644 --- a/src/vehicles/Cranes.cpp +++ b/src/vehicles/Cranes.cpp @@ -340,7 +340,7 @@ void CCrane::Update(void) case GOING_TOWARDS_TARGET_ONLY_HEIGHT: case ROTATING_TARGET: if (m_pVehiclePickedUp) { - m_pVehiclePickedUp->GetPosition() = CVector(m_vecHookCurPos.x, m_vecHookCurPos.y, m_vecHookCurPos.z - m_pVehiclePickedUp->GetColModel()->boundingBox.max.z); + m_pVehiclePickedUp->SetPosition(m_vecHookCurPos.x, m_vecHookCurPos.y, m_vecHookCurPos.z - m_pVehiclePickedUp->GetColModel()->boundingBox.max.z); m_pVehiclePickedUp->SetMoveSpeed(0.0f, 0.0f, 0.0f); CVector up(vecHook.x - m_vecHookCurPos.x, vecHook.y - m_vecHookCurPos.y, 20.0f); up.Normalise(); @@ -585,7 +585,7 @@ void CCrane::SetHookMatrix() { if (m_pHook == nil) return; - m_pHook->GetPosition() = m_vecHookCurPos; + m_pHook->SetPosition(m_vecHookCurPos); CVector up(m_vecHookInitPos.x - m_vecHookCurPos.x, m_vecHookInitPos.y - m_vecHookCurPos.y, 20.0f); up.Normalise(); m_pHook->GetRight() = CrossProduct(CVector(0.0f, 1.0f, 0.0f), up); diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp index dd2c4e57..e4cd5883 100644 --- a/src/vehicles/Heli.cpp +++ b/src/vehicles/Heli.cpp @@ -144,11 +144,11 @@ CHeli::ProcessControl(void) if(GetPosition().z > 31.55f) break; m_pathState = 7; - GetPosition().z = 31.55f; + GetMatrix().GetPosition().z = 31.55f; m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); break; case 7: - GetPosition().z = 31.55f; + GetMatrix().GetPosition().z = 31.55f; target = GetPosition(); break; @@ -214,8 +214,8 @@ CHeli::ProcessControl(void) vTargetDist = target - GetPosition(); m_fTargetZ = target.z; if(m_pathState == 6){ - GetPosition().x = GetPosition().x*0.99f + target.x*0.01f; - GetPosition().y = GetPosition().y*0.99f + target.y*0.01f; + GetMatrix().GetPosition().x = GetMatrix().GetPosition().x*0.99f + target.x*0.01f; + GetMatrix().GetPosition().y = GetMatrix().GetPosition().y*0.99f + target.y*0.01f; } }else{ vTargetDist = FindPlayerCoors() - GetPosition(); @@ -367,8 +367,8 @@ CHeli::ProcessControl(void) m_vecMoveSpeed.x += speedDir.x*speedInc; m_vecMoveSpeed.y += speedDir.y*speedInc; } - GetPosition().x += m_vecMoveSpeed.x*CTimer::GetTimeStep(); - GetPosition().y += m_vecMoveSpeed.y*CTimer::GetTimeStep(); + GetMatrix().GetPosition().x += m_vecMoveSpeed.x*CTimer::GetTimeStep(); + GetMatrix().GetPosition().y += m_vecMoveSpeed.y*CTimer::GetTimeStep(); // Find z target if(m_heliStatus == HELI_STATUS_FLY_AWAY) @@ -389,7 +389,7 @@ CHeli::ProcessControl(void) m_vecMoveSpeed.z -= speedIncZ; else m_vecMoveSpeed.z += speedIncZ*1.5f; - GetPosition().z += m_vecMoveSpeed.z*CTimer::GetTimeStep(); + GetMatrix().GetPosition().z += m_vecMoveSpeed.z*CTimer::GetTimeStep(); // Find angular speed float targetAngularSpeed; diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 07d81501..7831a0c8 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -161,7 +161,7 @@ CTrain::ProcessControl(void) CVector posFront = (1.0f - f)*trackNodes[curTrackNodeFront].p + f*trackNodes[nextTrackNodeFront].p; // Now set matrix - GetPosition() = (posRear + posFront)/2.0f; + SetPosition((posRear + posFront)/2.0f); CVector fwd = posFront - posRear; fwd.Normalise(); CVector right = CrossProduct(fwd, CVector(0.0f, 0.0f, 1.0f)); |