summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Heli.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-02 14:28:19 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-02 14:28:19 +0200
commit52390062b39a3398379934e59a15faa01613e586 (patch)
treeba7c8c16921d09a9ec1e2d33323ab142048a3290 /src/vehicles/Heli.cpp
parentSetPosition, part 1 (diff)
downloadre3-52390062b39a3398379934e59a15faa01613e586.tar
re3-52390062b39a3398379934e59a15faa01613e586.tar.gz
re3-52390062b39a3398379934e59a15faa01613e586.tar.bz2
re3-52390062b39a3398379934e59a15faa01613e586.tar.lz
re3-52390062b39a3398379934e59a15faa01613e586.tar.xz
re3-52390062b39a3398379934e59a15faa01613e586.tar.zst
re3-52390062b39a3398379934e59a15faa01613e586.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Heli.cpp14
1 files changed, 7 insertions, 7 deletions
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;